diff options
| author | Alan Conway <aconway@apache.org> | 2008-09-25 12:30:14 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2008-09-25 12:30:14 +0000 |
| commit | 48f511ecb4a772f2cf6048f9b5ddbf9a4e3f9587 (patch) | |
| tree | 7b75738562cf97befd775868670c336995ba0cd1 /cpp/src/qpid/amqp_0_10 | |
| parent | cd78f5c69d70b43e5bf82fa9125eb876bc3bbc42 (diff) | |
| download | qpid-python-48f511ecb4a772f2cf6048f9b5ddbf9a4e3f9587.tar.gz | |
Enabled management, add cluster shutdown command.
Remove dead Handler methods in Cluster.
Fixed SessionException handling in broker, was throwing some SessionExceptions as "unknown exception"
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@698945 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/amqp_0_10')
| -rw-r--r-- | cpp/src/qpid/amqp_0_10/SessionHandler.cpp | 9 | ||||
| -rw-r--r-- | cpp/src/qpid/amqp_0_10/SessionHandler.h | 4 |
2 files changed, 10 insertions, 3 deletions
diff --git a/cpp/src/qpid/amqp_0_10/SessionHandler.cpp b/cpp/src/qpid/amqp_0_10/SessionHandler.cpp index c9bb57a13e..02d72ffd11 100644 --- a/cpp/src/qpid/amqp_0_10/SessionHandler.cpp +++ b/cpp/src/qpid/amqp_0_10/SessionHandler.cpp @@ -81,6 +81,15 @@ void SessionHandler::handleIn(AMQFrame& f) { getInHandler()->handle(f); } } + catch(const SessionException& e) { + QPID_LOG(error, "Execution exception: " << e.what()); + framing::AMQP_AllProxy::Execution execution(channel); + AMQMethodBody* m = f.getMethod(); + SequenceNumber commandId; + if (getState()) commandId = getState()->receiverGetCurrent(); + execution.exception(e.code, commandId, m ? m->amqpClassId() : 0, m ? m->amqpMethodId() : 0, 0, e.what(), FieldTable()); + sendDetach(); + } catch(const ChannelException& e){ QPID_LOG(error, "Channel exception: " << e.what()); peer.detached(name, e.code); diff --git a/cpp/src/qpid/amqp_0_10/SessionHandler.h b/cpp/src/qpid/amqp_0_10/SessionHandler.h index 684258bbae..53ce12b47f 100644 --- a/cpp/src/qpid/amqp_0_10/SessionHandler.h +++ b/cpp/src/qpid/amqp_0_10/SessionHandler.h @@ -43,8 +43,6 @@ class SessionHandler : public framing::AMQP_AllOperations::SessionHandler, public framing::FrameHandler::InOutHandler { public: - typedef framing::AMQP_AllProxy::Session Peer; - SessionHandler(framing::FrameHandler* out=0, uint16_t channel=0); ~SessionHandler(); @@ -103,7 +101,7 @@ class SessionHandler : public framing::AMQP_AllOperations::SessionHandler, void checkName(const std::string& name); framing::ChannelHandler channel; - Peer peer; + framing::AMQP_AllProxy::Session peer; bool ignoring; bool sendReady, receiveReady; std::string name; |
