summaryrefslogtreecommitdiff
path: root/cpp/lib/broker/Reference.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/lib/broker/Reference.cpp')
-rw-r--r--cpp/lib/broker/Reference.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/cpp/lib/broker/Reference.cpp b/cpp/lib/broker/Reference.cpp
index dc9cb94f84..0aedef2bef 100644
--- a/cpp/lib/broker/Reference.cpp
+++ b/cpp/lib/broker/Reference.cpp
@@ -30,15 +30,14 @@ Reference& ReferenceRegistry::open(const Reference::Id& id) {
// TODO aconway 2007-02-05: should we throw Channel or Connection
// exceptions here?
if (i != references.end())
- THROW_QPID_ERROR(CLIENT_ERROR, "Attempt to re-open reference " +id);
+ throw ConnectionException(503, "Attempt to re-open reference " +id);
return references[id] = Reference(id, this);
}
Reference& ReferenceRegistry::get(const Reference::Id& id) {
ReferenceMap::iterator i = references.find(id);
if (i == references.end())
- THROW_QPID_ERROR(
- CLIENT_ERROR, "Attempt to use non-existent reference "+id);
+ throw ConnectionException(503, "Attempt to use non-existent reference "+id);
return i->second;
}