summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/SessionAdapter.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2011-02-25 17:30:59 +0000
committerGordon Sim <gsim@apache.org>2011-02-25 17:30:59 +0000
commitbfa12e5b349cb90e053c1f6ff24ee1192835968f (patch)
treedfc6cfaca71aff48418c4deb7eb5e6ac9c7b25df /cpp/src/qpid/broker/SessionAdapter.cpp
parentc6f75a2876188a7d28351c7da9ee62b94e361319 (diff)
downloadqpid-python-bfa12e5b349cb90e053c1f6ff24ee1192835968f.tar.gz
QPID-2324: Raise 404 on cancellation if no such subscription exists.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1074642 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/SessionAdapter.cpp')
-rw-r--r--cpp/src/qpid/broker/SessionAdapter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/cpp/src/qpid/broker/SessionAdapter.cpp b/cpp/src/qpid/broker/SessionAdapter.cpp
index b95bb196fd..68aa26b270 100644
--- a/cpp/src/qpid/broker/SessionAdapter.cpp
+++ b/cpp/src/qpid/broker/SessionAdapter.cpp
@@ -431,7 +431,9 @@ SessionAdapter::MessageHandlerImpl::subscribe(const string& queueName,
void
SessionAdapter::MessageHandlerImpl::cancel(const string& destination )
{
- state.cancel(destination);
+ if (!state.cancel(destination)) {
+ throw NotFoundException(QPID_MSG("No such subscription: " << destination));
+ }
ManagementAgent* agent = getBroker().getManagementAgent();
if (agent)