News for hackers. Stuff that matters.
Re:Why should I have written ZeroMQ in C, not C++ by aidenn0 on Thursday May 10, 2012 @02:57PM (#3955266)
Read up on exception specifiers in C++ and reconsider this comment.
Re:Why should I have written ZeroMQ in C, not C++ by davedx on Thursday May 10, 2012 @03:05PM (#3955319)
I just did; what I couldn't figure out, was is there a way to specify multiple different exception types in your C++ throw()?

In Java, you can do:

public int myfunc(int a, int b) throws IOException, InvalidGoatException {}

How would you do this in C++?

Re:Why should I have written ZeroMQ in C, not C++ by cbsmith on Friday May 11, 2012 @11:35AM (#3959723)
You can do much the same thing, only the meaning is the reverse.
Re:Why should I have written ZeroMQ in C, not C++ by signa11 on Thursday May 10, 2012 @03:10PM (#3955347)
> @davedx asks : is there a way to specify multiple different exception types in your C++ throw()?

yeah throw() can contain multiple types that can possibly be emitted e.g. int foo() throw(a,b,c,d) implies that foo can only throw either a/b/c/d types.

Re:Why should I have written ZeroMQ in C, not C++ by Peaker on Thursday May 10, 2012 @05:54PM (#3956312)
Except that is only enforced at runtime, and converts the exception type to unexpected_exception, which is even worse!
Re:Why should I have written ZeroMQ in C, not C++ by pubby on Thursday May 10, 2012 @05:17PM (#3956087)
Exception specifiers are deprecated and for good reason.