Commit 111f0ff0 authored by Martin Sustrik's avatar Martin Sustrik

ZMQII-41: Poll function in C++ binding doesn't convert errors to exceptions

parent 6b0457fc
......@@ -35,7 +35,10 @@ namespace zmq
inline int poll (zmq_pollitem_t *items_, int nitems_, long timeout_ = -1)
{
return zmq_poll (items_, nitems_, timeout_);
int rc = zmq_poll (items_, nitems_, timeout_);
if (rc < 0)
throw error_t ();
return rc;
}
class error_t : public std::exception
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment