clrzmq icon indicating copy to clipboard operation
clrzmq copied to clipboard

try catch Connect not working

Open jjzhu opened this issue 9 years ago • 0 comments

the try catch does not work when Connect to the serverPoint: 0.0.0.0:9000. Since this is not a valid address, I imagine it can be caught by the ZMQ.Exception error. However, the c# gives me a direct error and the program stopped. try { zmqContext = new Context(1); zmqSocket = zmqContext.Socket(SocketType.REQ); zmqSocket.Connect(serverPoint); this.serverPoint = serverPoint; } catch (ZMQ.Exception e) { Trace.WriteLine("error ZMQ: "+e.Message+" at:"+serverPoint); return; }

jjzhu avatar Sep 21 '15 19:09 jjzhu