summaryrefslogtreecommitdiff
path: root/cpp/lib/broker
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2007-01-22 11:49:39 +0000
committerGordon Sim <gsim@apache.org>2007-01-22 11:49:39 +0000
commitfcb17e3006a953478ce4e7486d2cb2e1687decf3 (patch)
tree9a44b82df13adc806e6b306d80c91a5571b8d4f8 /cpp/lib/broker
parent489c62e4b2ec7d9308c7b174d8e32739c41d4a5f (diff)
downloadqpid-python-fcb17e3006a953478ce4e7486d2cb2e1687decf3.tar.gz
Fixed creation of error message for unknown channel.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@498591 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/lib/broker')
-rw-r--r--cpp/lib/broker/SessionHandlerImpl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/cpp/lib/broker/SessionHandlerImpl.cpp b/cpp/lib/broker/SessionHandlerImpl.cpp
index da49a94d68..26cdfebad2 100644
--- a/cpp/lib/broker/SessionHandlerImpl.cpp
+++ b/cpp/lib/broker/SessionHandlerImpl.cpp
@@ -19,6 +19,7 @@
*
*/
#include <iostream>
+#include <sstream>
#include <SessionHandlerImpl.h>
#include <FanOutExchange.h>
#include <HeadersExchange.h>
@@ -64,7 +65,9 @@ SessionHandlerImpl::~SessionHandlerImpl(){
Channel* SessionHandlerImpl::getChannel(u_int16_t channel){
channel_iterator i = channels.find(channel);
if(i == channels.end()){
- throw ConnectionException(504, "Unknown channel: " + channel);
+ std::stringstream out;
+ out << "Unknown channel: " << channel;
+ throw ConnectionException(504, out.str());
}
return i->second;
}