diff options
Diffstat (limited to 'cpp/src/qpid/asyncStore/OperationQueue.cpp')
-rw-r--r-- | cpp/src/qpid/asyncStore/OperationQueue.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/cpp/src/qpid/asyncStore/OperationQueue.cpp b/cpp/src/qpid/asyncStore/OperationQueue.cpp index 4eabf82004..0b7f58bd6c 100644 --- a/cpp/src/qpid/asyncStore/OperationQueue.cpp +++ b/cpp/src/qpid/asyncStore/OperationQueue.cpp @@ -50,17 +50,23 @@ OperationQueue::submit(boost::shared_ptr<const AsyncOperation> op) OperationQueue::OpQueue::Batch::const_iterator OperationQueue::handle(const OperationQueue::OpQueue::Batch& e) { - for (OpQueue::Batch::const_iterator i = e.begin(); i != e.end(); ++i) { + try { + for (OpQueue::Batch::const_iterator i = e.begin(); i != e.end(); ++i) { //std::cout << "<-- OperationQueue::handle() Op=" << (*i)->getOpStr() << std::endl << std::flush; - boost::shared_ptr<qpid::broker::BrokerAsyncContext> bc = (*i)->getBrokerContext(); - if (bc) { - qpid::broker::AsyncResultQueue* const arq = bc->getAsyncResultQueue(); - if (arq) { - qpid::broker::AsyncResultHandleImpl* arhi = new qpid::broker::AsyncResultHandleImpl(bc); - boost::shared_ptr<qpid::broker::AsyncResultHandle> arh(new qpid::broker::AsyncResultHandle(arhi)); - arq->submit(arh); + boost::shared_ptr<qpid::broker::BrokerAsyncContext> bc = (*i)->getBrokerContext(); + if (bc) { + qpid::broker::AsyncResultQueue* const arq = bc->getAsyncResultQueue(); + if (arq) { + qpid::broker::AsyncResultHandleImpl* arhi = new qpid::broker::AsyncResultHandleImpl(bc); + boost::shared_ptr<qpid::broker::AsyncResultHandle> arh(new qpid::broker::AsyncResultHandle(arhi)); + arq->submit(arh); + } } } + } catch (const std::exception& e) { + std::cerr << "qpid::asyncStore::OperationQueue: Exception thrown processing async op: " << e.what() << std::endl; + } catch (...) { + std::cerr << "qpid::asyncStore::OperationQueue: Unknown exception thrown processing async op" << std::endl; } return e.end(); } |