summaryrefslogtreecommitdiff
path: root/indra/llcommon/llthreadsafequeue.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2016-08-17 11:36:24 -0400
committerNat Goodspeed <nat@lindenlab.com>2016-08-17 11:36:24 -0400
commit5e9d2f57c82a57307a48afea09aa539b9fa80abf (patch)
treeea16b2c580c2a831f54c217deb5d64b8d755eff4 /indra/llcommon/llthreadsafequeue.cpp
parent1ed76c382e8b87bff02b6d37cf8acd7f6b1f8063 (diff)
MAINT-5011: Use LLTHROW() instead of plain BOOST_THROW_EXCEPTION().
A level of preprocessor indirection lets us later change the implementation if desired.
Diffstat (limited to 'indra/llcommon/llthreadsafequeue.cpp')
-rw-r--r--indra/llcommon/llthreadsafequeue.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/indra/llcommon/llthreadsafequeue.cpp b/indra/llcommon/llthreadsafequeue.cpp
index a004618e96..491f920c0f 100644
--- a/indra/llcommon/llthreadsafequeue.cpp
+++ b/indra/llcommon/llthreadsafequeue.cpp
@@ -26,8 +26,8 @@
#include "linden_common.h"
#include <apr_pools.h>
#include <apr_queue.h>
-#include <boost/throw_exception.hpp>
#include "llthreadsafequeue.h"
+#include "llexception.h"
@@ -42,13 +42,13 @@ LLThreadSafeQueueImplementation::LLThreadSafeQueueImplementation(apr_pool_t * po
{
if(mOwnsPool) {
apr_status_t status = apr_pool_create(&mPool, 0);
- if(status != APR_SUCCESS) BOOST_THROW_EXCEPTION(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) BOOST_THROW_EXCEPTION(LLThreadSafeQueueError("failed to allocate queue"));
+ if(status != APR_SUCCESS) LLTHROW(LLThreadSafeQueueError("failed to allocate queue"));
}
@@ -69,9 +69,9 @@ void LLThreadSafeQueueImplementation::pushFront(void * element)
apr_status_t status = apr_queue_push(mQueue, element);
if(status == APR_EINTR) {
- BOOST_THROW_EXCEPTION(LLThreadSafeQueueInterrupt());
+ LLTHROW(LLThreadSafeQueueInterrupt());
} else if(status != APR_SUCCESS) {
- BOOST_THROW_EXCEPTION(LLThreadSafeQueueError("push failed"));
+ LLTHROW(LLThreadSafeQueueError("push failed"));
} else {
; // Success.
}
@@ -89,9 +89,9 @@ void * LLThreadSafeQueueImplementation::popBack(void)
apr_status_t status = apr_queue_pop(mQueue, &element);
if(status == APR_EINTR) {
- BOOST_THROW_EXCEPTION(LLThreadSafeQueueInterrupt());
+ LLTHROW(LLThreadSafeQueueInterrupt());
} else if(status != APR_SUCCESS) {
- BOOST_THROW_EXCEPTION(LLThreadSafeQueueError("pop failed"));
+ LLTHROW(LLThreadSafeQueueError("pop failed"));
} else {
return element;
}