diff options
| author | Kim van der Riet <kpvdr@apache.org> | 2012-06-19 12:57:15 +0000 |
|---|---|---|
| committer | Kim van der Riet <kpvdr@apache.org> | 2012-06-19 12:57:15 +0000 |
| commit | 5083cef28cd7d1f594a7632ffec109567f5a3b2b (patch) | |
| tree | 3b1e3d822339fffed4bf1e9f010e2a2b5a20f3b6 /cpp/src/qpid/broker/AsyncResultQueueImpl.cpp | |
| parent | 58337ca40df3a57a16cdee9b7f6b4fe0361b0018 (diff) | |
| download | qpid-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.cpp | 12 |
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(); } |
