summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/AsyncResultQueueImpl.cpp
diff options
context:
space:
mode:
authorKim van der Riet <kpvdr@apache.org>2012-06-19 12:57:15 +0000
committerKim van der Riet <kpvdr@apache.org>2012-06-19 12:57:15 +0000
commit5083cef28cd7d1f594a7632ffec109567f5a3b2b (patch)
tree3b1e3d822339fffed4bf1e9f010e2a2b5a20f3b6 /cpp/src/qpid/broker/AsyncResultQueueImpl.cpp
parent58337ca40df3a57a16cdee9b7f6b4fe0361b0018 (diff)
downloadqpid-python-5083cef28cd7d1f594a7632ffec109567f5a3b2b.tar.gz
QPID-3858: WIP: Solved race conditions affecting transactional publishing.
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/asyncstore@1351689 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/AsyncResultQueueImpl.cpp')
-rw-r--r--cpp/src/qpid/broker/AsyncResultQueueImpl.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/cpp/src/qpid/broker/AsyncResultQueueImpl.cpp b/cpp/src/qpid/broker/AsyncResultQueueImpl.cpp
index 9e3298bb4e..62c7ed33d9 100644
--- a/cpp/src/qpid/broker/AsyncResultQueueImpl.cpp
+++ b/cpp/src/qpid/broker/AsyncResultQueueImpl.cpp
@@ -49,11 +49,17 @@ AsyncResultQueueImpl::submit(boost::shared_ptr<AsyncResultHandle> arh)
AsyncResultQueueImpl::ResultQueue::Batch::const_iterator
AsyncResultQueueImpl::handle(const ResultQueue::Batch& e)
{
- for (ResultQueue::Batch::const_iterator i = e.begin(); i != e.end(); ++i) {
+ try {
+ for (ResultQueue::Batch::const_iterator i = e.begin(); i != e.end(); ++i) {
//std::cout << "<== AsyncResultQueueImpl::handle() errNo=" << (*i)->getErrNo() << " errMsg=\"" << (*i)->getErrMsg() << "\"" << std::endl << std::flush;
- if ((*i)->isValid()) {
- (*i)->invokeAsyncResultCallback();
+ if ((*i)->isValid()) {
+ (*i)->invokeAsyncResultCallback();
+ }
}
+ } catch (const std::exception& e) {
+ std::cerr << "qpid::broker::AsyncResultQueueImpl: Exception thrown processing async result: " << e.what() << std::endl;
+ } catch (...) {
+ std::cerr << "qpid::broker::AsyncResultQueueImpl: Unknown exception thrown processing async result" << std::endl;
}
return e.end();
}