[zeromq-dev] [BUG] zmq_assert causes BOOM if you breath on OSX Lion kqueue wrong.
Steven McCoy
steven.mccoy at miru.hk
Sat Oct 1 03:43:10 CEST 2011
On 30 September 2011 18:22, Zed Shaw <zed.shaw at gmail.com> wrote:
> <rant>
> And, having to troll through C++ code to debug why I'm
> getting the error is annoying. At a minimum, add a 3rd parameter that
> gives an error message that's other than something like "No such file
> or directory". WTF does that even mean for kqueue? I sure as hell
> didn't do anything to cause that. How could I possibly fix that?
> </rant>
>
>
How is the OpenPGM method of error handling? I followed the GLib route
because a single error code is just annoying and tedious, but you don't want
to add too much overhead and unnecessary confusion as it does add to the
learning curve.
typedef struct {
int domain;
int code;
char* message;
} pgm_error_t;
pgm_error_t* err = NULL;
if (!pgm_getaddrinfo (network, NULL, &res, &err)) {
fprintf (stderr, "Parsing network parameter: %s\n", (err &&
err->message) ? err->message : "(null)");
pgm_error_free (err);
...
}
--
Steve-o
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110930/3c264a78/attachment.htm>
More information about the zeromq-dev
mailing list