summaryrefslogtreecommitdiff
path: root/indra/llcommon/llthreadsafequeue.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2016-09-06 11:07:39 -0400
committerOz Linden <oz@lindenlab.com>2016-09-06 11:07:39 -0400
commit5edd4cecfc53b8287e1b3c6a22142bc72b8e0356 (patch)
treeb5bed4e1e4279b88ae882d93264dc2234ecb81e8 /indra/llcommon/llthreadsafequeue.cpp
parent8c86c594be7b7898ac6e622c505181cf5b000da6 (diff)
parent1804da89eea38615a4dd9532757b7ef7c35d2be6 (diff)
merge changes for exception handling
Diffstat (limited to 'indra/llcommon/llthreadsafequeue.cpp')
-rw-r--r--indra/llcommon/llthreadsafequeue.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/indra/llcommon/llthreadsafequeue.cpp b/indra/llcommon/llthreadsafequeue.cpp
index 185f0d63fb..491f920c0f 100644
--- a/indra/llcommon/llthreadsafequeue.cpp
+++ b/indra/llcommon/llthreadsafequeue.cpp
@@ -27,6 +27,7 @@
#include <apr_pools.h>
#include <apr_queue.h>
#include "llthreadsafequeue.h"
+#include "llexception.h"
@@ -41,13 +42,13 @@ LLThreadSafeQueueImplementation::LLThreadSafeQueueImplementation(apr_pool_t * po
{
if(mOwnsPool) {
apr_status_t status = apr_pool_create(&mPool, 0);
- if(status != APR_SUCCESS) throw LLThreadSafeQueueError("failed to allocate pool");
+ if(status != APR_SUCCESS) LLTHROW(LLThreadSafeQueueError("failed to allocate pool"));
} else {
; // No op.
}
apr_status_t status = apr_queue_create(&mQueue, capacity, mPool);
- if(status != APR_SUCCESS) throw LLThreadSafeQueueError("failed to allocate queue");
+ if(status != APR_SUCCESS) LLTHROW(LLThreadSafeQueueError("failed to allocate queue"));
}
@@ -68,9 +69,9 @@ void LLThreadSafeQueueImplementation::pushFront(void * element)
apr_status_t status = apr_queue_push(mQueue, element);
if(status == APR_EINTR) {
- throw LLThreadSafeQueueInterrupt();
+ LLTHROW(LLThreadSafeQueueInterrupt());
} else if(status != APR_SUCCESS) {
- throw LLThreadSafeQueueError("push failed");
+ LLTHROW(LLThreadSafeQueueError("push failed"));
} else {
; // Success.
}
@@ -88,9 +89,9 @@ void * LLThreadSafeQueueImplementation::popBack(void)
apr_status_t status = apr_queue_pop(mQueue, &element);
if(status == APR_EINTR) {
- throw LLThreadSafeQueueInterrupt();
+ LLTHROW(LLThreadSafeQueueInterrupt());
} else if(status != APR_SUCCESS) {
- throw LLThreadSafeQueueError("pop failed");
+ LLTHROW(LLThreadSafeQueueError("pop failed"));
} else {
return element;
}