From 5083cef28cd7d1f594a7632ffec109567f5a3b2b Mon Sep 17 00:00:00 2001 From: Kim van der Riet Date: Tue, 19 Jun 2012 12:57:15 +0000 Subject: 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 --- cpp/src/qpid/broker/AsyncResultQueueImpl.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'cpp/src/qpid/broker/AsyncResultQueueImpl.cpp') 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 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(); } -- cgit v1.2.1