[zeromq-dev] zeromq, abort(), and high reliability environments

Pieter Hintjens ph at imatix.com
Mon Aug 11 16:14:19 CEST 2014


On Mon, Aug 11, 2014 at 11:33 AM, Goswin von Brederlow
<goswin-v-b at web.de> wrote:

> My suggestion is that if you find an assertion that gets triggered
> then patch it out and handle the error properly and send a pull
> request for the fix.

Respectfully disagree. Exceptions indicate unrecoverable failure of
one kind or another. The fix depends on the case.

CZMQ fwiw uses exceptions to check arguments, e.g. asserts if caller
passes NULL when not allowed. This is extremely effective. If the
application is misusing the API then it's incapable of handling error
codes.

I've started adding more aggressive CZMQ-style exceptions to libzmq as
well, for the options API, enabled with the --with-militant configure
switch.

-Pieter



More information about the zeromq-dev mailing list