summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2007-12-14 11:22:56 +0000
committerGordon Sim <gsim@apache.org>2007-12-14 11:22:56 +0000
commit777df5f4bcea34e918f4087ddc06f182bec5d5bc (patch)
tree496c745c96bd54e4d975e8ef779831a2b5435911 /cpp
parent6d4843497680f91c996a8b8695e4a802ce25c8b7 (diff)
downloadqpid-python-777df5f4bcea34e918f4087ddc06f182bec5d5bc.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/qpid@604167 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/qpid/broker/Connection.cpp9
1 files changed, 8 insertions, 1 deletions
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) {