diff options
Diffstat (limited to 'bindings/cpp/zmq.hpp')
-rw-r--r-- | bindings/cpp/zmq.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bindings/cpp/zmq.hpp b/bindings/cpp/zmq.hpp index a572c69..0afeff0 100644 --- a/bindings/cpp/zmq.hpp +++ b/bindings/cpp/zmq.hpp @@ -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 |