[zeromq-dev] Compatibility 3.1 - 3.2.1-rc2

Aurélien Vallée vallee.aurelien at gmail.com
Fri Nov 16 13:05:29 CET 2012

Asserts are made to check for clear incoherent behavior in a library.
Something that just could not happen if the library is coded properly. They
should check for things like function pre/post conditions. They are for
library developers, not end users!
A change in the wire format causing an assert is just not the proper way to
handle the problem, since this is completely unrecoverable on the library
user side.

This may be generalized to the fact that asserts should not be used for
anything exterior to the library (such as the wire protocol). For instance,
in a file management library, you don't want an assert to be triggered if
there is no space left on the device: you want an error code! I cannot
afford my whole program to crash, just because the broker on the other side
was updated.

Imagine the simple case of using 0mq to log some stuff. Would you accept
that your whole program could crash at any time if someone update the log
receiver on the other side? no way! You would want to just be able to
disable the network logging, period.

On Fri, Nov 16, 2012 at 11:23 AM, Martin Hurton <hurtonm at gmail.com> wrote:

> > Can't even build something more robust top of 0mq, since most of the time
> > the only internal error handling of 0mq is a rough assert.
> This is an internal error, what would you suggest instead?
> - Martin
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Aurélien Vallée
+33 6 47 41 70 37
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20121116/8e330b7c/attachment.htm>

More information about the zeromq-dev mailing list