summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/SessionAdapter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/broker/SessionAdapter.cpp')
-rw-r--r--cpp/src/qpid/broker/SessionAdapter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpp/src/qpid/broker/SessionAdapter.cpp b/cpp/src/qpid/broker/SessionAdapter.cpp
index d4f6b28ccb..3d62e73185 100644
--- a/cpp/src/qpid/broker/SessionAdapter.cpp
+++ b/cpp/src/qpid/broker/SessionAdapter.cpp
@@ -371,7 +371,8 @@ void SessionAdapter::QueueHandlerImpl::declare(const string& name, const string&
}
//apply settings & create persistent record if required
- queue_created.first->create(arguments);
+ try { queue_created.first->create(arguments); }
+ catch (...) { getBroker().getQueues().destroy(name); throw; }
//add default binding:
getBroker().getExchanges().getDefault()->bind(queue, name, 0);