diff options
Diffstat (limited to 'cpp/src/qpid/client/ConnectionHandler.cpp')
-rw-r--r-- | cpp/src/qpid/client/ConnectionHandler.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cpp/src/qpid/client/ConnectionHandler.cpp b/cpp/src/qpid/client/ConnectionHandler.cpp index 4058bfb33f..a8f10c32a9 100644 --- a/cpp/src/qpid/client/ConnectionHandler.cpp +++ b/cpp/src/qpid/client/ConnectionHandler.cpp @@ -68,7 +68,7 @@ void ConnectionHandler::incoming(AMQFrame& frame) try { in(frame); }catch(ConnectionException& e){ - error(e.code, e.toString(), body); + error(e.code, e.what(), body); }catch(std::exception& e){ error(541/*internal error*/, e.what(), body); } @@ -124,6 +124,8 @@ void ConnectionHandler::error(uint16_t code, const std::string& message, uint16_ void ConnectionHandler::error(uint16_t code, const std::string& message, AMQBody* body) { + if (onError) + onError(code, message); AMQMethodBody* method = body->getMethod(); if (method) error(code, message, method->amqpClassId(), method->amqpMethodId()); |