From 777df5f4bcea34e918f4087ddc06f182bec5d5bc Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Fri, 14 Dec 2007 11:22:56 +0000 Subject: Handle exceptions while doing 'output' for the connection (i.e. message delivery) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@604167 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/Connection.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'cpp') diff --git a/cpp/src/qpid/broker/Connection.cpp b/cpp/src/qpid/broker/Connection.cpp index 6a13c05242..4f0eeaa21a 100644 --- a/cpp/src/qpid/broker/Connection.cpp +++ b/cpp/src/qpid/broker/Connection.cpp @@ -99,7 +99,14 @@ void Connection::closed(){ // Physically closed, suspend open sessions. bool Connection::doOutput() { - return outputTasks.doOutput(); + try{ + return outputTasks.doOutput(); + }catch(ConnectionException& e){ + close(e.code, e.what(), 0, 0); + }catch(std::exception& e){ + close(541/*internal error*/, e.what(), 0, 0); + } + return false; } void Connection::closeChannel(uint16_t id) { -- cgit v1.2.1