diff options
author | Gordon Sim <gsim@apache.org> | 2007-12-14 11:22:56 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2007-12-14 11:22:56 +0000 |
commit | 34c961a365be543f7da5998018da5bb390d2ce7e (patch) | |
tree | 00c702b6f8b2a737fcc011f36273c05de9637985 | |
parent | abbf60fa108b4349daa50ce3e80546a76e72b348 (diff) | |
download | qpid-python-34c961a365be543f7da5998018da5bb390d2ce7e.tar.gz |
Handle exceptions while doing 'output' for the connection (i.e. message delivery)
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@604167 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/cpp/src/qpid/broker/Connection.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/qpid/cpp/src/qpid/broker/Connection.cpp b/qpid/cpp/src/qpid/broker/Connection.cpp index 6a13c05242..4f0eeaa21a 100644 --- a/qpid/cpp/src/qpid/broker/Connection.cpp +++ b/qpid/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) { |