diff options
author | Gordon Sim <gsim@apache.org> | 2012-08-09 17:15:15 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2012-08-09 17:15:15 +0000 |
commit | e97f0db3209ff05f8635050ef873aa1de5f3ec49 (patch) | |
tree | d1839636a0fcf65a15f367a6a279937f8b9e9023 /cpp/src | |
parent | 60ad96909155e354075327aba0a5d342dfccd798 (diff) | |
download | qpid-python-e97f0db3209ff05f8635050ef873aa1de5f3ec49.tar.gz |
QPID-4200: Add exception handling to qpid::client::AutoCancel destructor
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1371320 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qpid/client/SubscriptionManagerImpl.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cpp/src/qpid/client/SubscriptionManagerImpl.cpp b/cpp/src/qpid/client/SubscriptionManagerImpl.cpp index 7dead112e5..44f81776c0 100644 --- a/cpp/src/qpid/client/SubscriptionManagerImpl.cpp +++ b/cpp/src/qpid/client/SubscriptionManagerImpl.cpp @@ -28,6 +28,7 @@ #include <qpid/client/Session.h> #include <qpid/client/MessageListener.h> #include <qpid/framing/Uuid.h> +#include <qpid/log/Statement.h> #include <set> #include <sstream> @@ -167,6 +168,15 @@ void SubscriptionManagerImpl::setFlowControl(const std::string& name, uint32_t m setFlowControl(name, FlowControl(messages, bytes, window)); } +AutoCancel::AutoCancel(SubscriptionManager& sm_, const std::string& tag_) : sm(sm_), tag(tag_) {} +AutoCancel::~AutoCancel() { + try { + sm.cancel(tag); + } catch (const qpid::Exception& e) { + QPID_LOG(info, "Exception in AutoCancel destructor: " << e.what()); + } +} + }} // namespace qpid::client |