fix(driver):csharp example ci failed for read from null point

This commit is contained in:
xleili 2022-11-04 17:24:32 +08:00
parent ff1313f9bc
commit cf9e851c2c
4 changed files with 5 additions and 4 deletions

View File

@ -9,9 +9,10 @@ namespace Examples
{
string DSN = "ws://root:taosdata@127.0.0.1:6041/test";
IntPtr wsConn = LibTaosWS.WSConnectWithDSN(DSN);
if (wsConn == IntPtr.Zero)
{
throw new Exception($"get WS connection failed,reason:{LibTaosWS.WSErrorStr(IntPtr.Zero)} code:{LibTaosWS.WSErrorNo(IntPtr.Zero)}");
throw new Exception("get WS connection failed");
}
else
{

View File

@ -13,7 +13,7 @@ namespace Examples
// Assert if connection is validate
if (wsConn == IntPtr.Zero)
{
throw new Exception($"get WS connection failed,reason:{LibTaosWS.WSErrorStr(IntPtr.Zero)} code:{LibTaosWS.WSErrorNo(IntPtr.Zero)}");
throw new Exception("get WS connection failed");
}
else
{

View File

@ -13,7 +13,7 @@ namespace Examples
IntPtr wsConn = LibTaosWS.WSConnectWithDSN(DSN);
if (wsConn == IntPtr.Zero)
{
throw new Exception($"get WS connection failed,reason:{LibTaosWS.WSErrorStr(IntPtr.Zero)} code:{LibTaosWS.WSErrorNo(IntPtr.Zero)}");
throw new Exception("get WS connection failed");
}
else
{

View File

@ -21,7 +21,7 @@ namespace Examples
IntPtr wsConn = LibTaosWS.WSConnectWithDSN(DSN);
if (wsConn == IntPtr.Zero)
{
throw new Exception($"get WS connection failed,reason:{LibTaosWS.WSErrorStr(IntPtr.Zero)} code:{LibTaosWS.WSErrorNo(IntPtr.Zero)}");
throw new Exception($"get WS connection failed");
}
else
{