diff --git a/docs/examples/csharp/wsConnect/Program.cs b/docs/examples/csharp/wsConnect/Program.cs index 2e89372c3e..f9a56c842f 100644 --- a/docs/examples/csharp/wsConnect/Program.cs +++ b/docs/examples/csharp/wsConnect/Program.cs @@ -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 { diff --git a/docs/examples/csharp/wsInsert/Program.cs b/docs/examples/csharp/wsInsert/Program.cs index 4cd812cda9..1f2d0a6725 100644 --- a/docs/examples/csharp/wsInsert/Program.cs +++ b/docs/examples/csharp/wsInsert/Program.cs @@ -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 { diff --git a/docs/examples/csharp/wsQuery/Program.cs b/docs/examples/csharp/wsQuery/Program.cs index de5591aa53..a220cae903 100644 --- a/docs/examples/csharp/wsQuery/Program.cs +++ b/docs/examples/csharp/wsQuery/Program.cs @@ -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 { diff --git a/docs/examples/csharp/wsStmt/Program.cs b/docs/examples/csharp/wsStmt/Program.cs index 54de77ec1f..8af807ec39 100644 --- a/docs/examples/csharp/wsStmt/Program.cs +++ b/docs/examples/csharp/wsStmt/Program.cs @@ -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 {