mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-10 07:56:09 +00:00
ZMQII-41: Poll function in C++ binding doesn't convert errors to exceptions
This commit is contained in:
parent
6b0457fcaa
commit
111f0ff078
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user