On Jan 19, 2012, at 11:21 AM, john skaller wrote: > > FYI: Felix is a C++ code generator. Also, Felix does not support exceptions. > So if a default constructor throws an exception it will terminate the program. > In C++ you might suggest throwing an exception, because it can be caught > and managed before your online 0MQ based network crashes: in Felix > that's not an option. Sure .. I can wrap the constructor in a function that > catches the exception .. but then what do I do with it? Back where we started.
It should just fail fast. If the unthinkable happens (zmq_msg_init fails), then the program should come down. It's clearly a *bug* somewhere, so the author should fix it. Your philosophy may be different, but the fail-fast philosophy has worked pretty well for 0mq (grep the source base for "assert"). cr _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
