提交 cf9e851c 编写于 作者: X xleili

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

上级 ff1313f9
...@@ -9,9 +9,10 @@ namespace Examples ...@@ -9,9 +9,10 @@ namespace Examples
{ {
string DSN = "ws://root:taosdata@127.0.0.1:6041/test"; string DSN = "ws://root:taosdata@127.0.0.1:6041/test";
IntPtr wsConn = LibTaosWS.WSConnectWithDSN(DSN); IntPtr wsConn = LibTaosWS.WSConnectWithDSN(DSN);
if (wsConn == IntPtr.Zero) 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 else
{ {
......
...@@ -13,7 +13,7 @@ namespace Examples ...@@ -13,7 +13,7 @@ namespace Examples
// Assert if connection is validate // Assert if connection is validate
if (wsConn == IntPtr.Zero) 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 else
{ {
......
...@@ -13,7 +13,7 @@ namespace Examples ...@@ -13,7 +13,7 @@ namespace Examples
IntPtr wsConn = LibTaosWS.WSConnectWithDSN(DSN); IntPtr wsConn = LibTaosWS.WSConnectWithDSN(DSN);
if (wsConn == IntPtr.Zero) 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 else
{ {
......
...@@ -21,7 +21,7 @@ namespace Examples ...@@ -21,7 +21,7 @@ namespace Examples
IntPtr wsConn = LibTaosWS.WSConnectWithDSN(DSN); IntPtr wsConn = LibTaosWS.WSConnectWithDSN(DSN);
if (wsConn == IntPtr.Zero) 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 else
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册