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/pipe.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/pipe.cpp')
-rw-r--r-- | src/pipe.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pipe.cpp b/src/pipe.cpp index 6335690..9888a7b 100644 --- a/src/pipe.cpp +++ b/src/pipe.cpp @@ -182,7 +182,7 @@ zmq::writer_t::writer_t (object_t *parent_, pipe_t *pipe_, reader_t *reader_, // Open the swap file, if required. if (swap_size_ > 0) { swap = new (std::nothrow) swap_t (swap_size_); - zmq_assert (swap); + alloc_assert (swap); int rc = swap->init (); zmq_assert (rc == 0); } @@ -399,10 +399,10 @@ void zmq::create_pipe (object_t *reader_parent_, object_t *writer_parent_, // writer. The pipe will be handled by reader and writer, its never passed // to the user. Reader and writer are returned to the user. pipe_t *pipe = new (std::nothrow) pipe_t (); - zmq_assert (pipe); + alloc_assert (pipe); *reader_ = new (std::nothrow) reader_t (reader_parent_, pipe, lwm); - zmq_assert (*reader_); + alloc_assert (*reader_); *writer_ = new (std::nothrow) writer_t (writer_parent_, pipe, *reader_, hwm_, swap_size_); - zmq_assert (*writer_); + alloc_assert (*writer_); } |