Hello list. Continuing review of the libzmq code, I have found a few situations when the program will be crushed on segmentation fault. On the one hand, it is possible to refer to an error because of the user. But on the other hand, Coding Style says: Assertions say that the ØMQ developers do not expect this situation to ever happen, i.e. it is an internal error that demands a fix to the ØMQ code.
I consider that programs crash on segmentation fault is an inadmissible error of the ØMQ developers', but not the library user's. For example the call: >rc = zmq_setsockopt (sub, ZMQ_SUBSCRIBE, 0, 4); will end on segmentation fault on line 56 of the sub.cpp file. According to the documentation, if an error occurs, the function should return -1. I can not decide how to handle such a situation. Should I use assert or return EINVAL? Regards. niXman. _______________________________________________ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev