From 43e8868875e1d5287979e5b9060a9b16be45cc79 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Tue, 22 Feb 2011 16:23:36 +0100 Subject: Added explicit error message in case of memory exhaustion Signed-off-by: Martin Sustrik --- src/pipe.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/pipe.cpp') 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_); } -- cgit v1.2.3