summaryrefslogtreecommitdiff
path: root/cpp/lib/broker
diff options
context:
space:
mode:
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;
}