Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try catch Connect not working #168

Open
jjzhu opened this issue Sep 21, 2015 · 0 comments
Open

try catch Connect not working #168

jjzhu opened this issue Sep 21, 2015 · 0 comments

Comments

@jjzhu
Copy link

jjzhu commented Sep 21, 2015

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;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant