diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2011-02-22 16:23:36 +0100 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2011-02-22 16:23:36 +0100 |
commit | 43e8868875e1d5287979e5b9060a9b16be45cc79 (patch) | |
tree | d6df0587b107de28641b429048dff002e3c2387f /src/socket_base.cpp | |
parent | 98ccff1a24a056aef15372b131eee1c1bf8f62ca (diff) |
Added explicit error message in case of memory exhaustion
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/socket_base.cpp')
-rw-r--r-- | src/socket_base.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/socket_base.cpp b/src/socket_base.cpp index f15ab9d..2d366e8 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -103,7 +103,7 @@ zmq::socket_base_t *zmq::socket_base_t::create (int type_, class ctx_t *parent_, errno = EINVAL; return NULL; } - zmq_assert (s); + alloc_assert (s); return s; } @@ -318,7 +318,7 @@ int zmq::socket_base_t::bind (const char *addr_) // Create and run the listener. zmq_listener_t *listener = new (std::nothrow) zmq_listener_t ( io_thread, this, options); - zmq_assert (listener); + alloc_assert (listener); int rc = listener->set_address (protocol.c_str(), address.c_str ()); if (rc != 0) { delete listener; @@ -420,7 +420,7 @@ int zmq::socket_base_t::connect (const char *addr_) // Create session. connect_session_t *session = new (std::nothrow) connect_session_t ( io_thread, this, options, protocol.c_str (), address.c_str ()); - zmq_assert (session); + alloc_assert (session); // If 'immediate connect' feature is required, we'll create the pipes // to the session straight away. Otherwise, they'll be created by the |