1 Oct 2011 03:43
Re: [BUG] zmq_assert causes BOOM if you breath on OSX Lion kqueue wrong.
Steven McCoy <steven.mccoy <at> miru.hk>
2011-10-01 01:43:10 GMT
2011-10-01 01:43:10 GMT
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); ... }
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
_______________________________________________ zeromq-dev mailing list zeromq-dev <at> lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
RSS Feed