summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@fastmq.commkdir>2010-01-20 09:19:03 +0100
committerMartin Sustrik <sustrik@fastmq.commkdir>2010-01-20 09:19:03 +0100
commit111f0ff078372e8a0f5c0b98170d451d6561e85e (patch)
tree9fb48870facd450eb26dba64aded7766cf20f069
parent6b0457fcaad3fa9a2e632b3799119c40da8dd6ca (diff)
ZMQII-41: Poll function in C++ binding doesn't convert errors to exceptions
-rw-r--r--bindings/cpp/zmq.hpp5
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