You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2017/07/14 16:12:48 UTC
qpid-cpp git commit: QPID-7859: fix exception handling
Repository: qpid-cpp
Updated Branches:
refs/heads/master 0ffa89e17 -> b371bd86d
QPID-7859: fix exception handling
Project: http://git-wip-us.apache.org/repos/asf/qpid-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-cpp/commit/b371bd86
Tree: http://git-wip-us.apache.org/repos/asf/qpid-cpp/tree/b371bd86
Diff: http://git-wip-us.apache.org/repos/asf/qpid-cpp/diff/b371bd86
Branch: refs/heads/master
Commit: b371bd86d1026ba922eca8fb6b3b920af0b4a6a8
Parents: 0ffa89e
Author: Gordon Sim <gs...@redhat.com>
Authored: Fri Jul 14 16:43:38 2017 +0100
Committer: Gordon Sim <gs...@redhat.com>
Committed: Fri Jul 14 17:12:02 2017 +0100
----------------------------------------------------------------------
src/qpid/broker/amqp/Connection.cpp | 1 +
src/qpid/broker/amqp/Session.cpp | 16 ++++++++++------
2 files changed, 11 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-cpp/blob/b371bd86/src/qpid/broker/amqp/Connection.cpp
----------------------------------------------------------------------
diff --git a/src/qpid/broker/amqp/Connection.cpp b/src/qpid/broker/amqp/Connection.cpp
index 9a25e35..2d3566a 100644
--- a/src/qpid/broker/amqp/Connection.cpp
+++ b/src/qpid/broker/amqp/Connection.cpp
@@ -446,6 +446,7 @@ void Connection::process()
doSessionRemoteClose(pn_event_session(event));
break;
case PN_LINK_REMOTE_OPEN:
+ QPID_LOG(notice, "Got link open event");
doLinkRemoteOpen(pn_event_link(event));
break;
case PN_LINK_REMOTE_DETACH:
http://git-wip-us.apache.org/repos/asf/qpid-cpp/blob/b371bd86/src/qpid/broker/amqp/Session.cpp
----------------------------------------------------------------------
diff --git a/src/qpid/broker/amqp/Session.cpp b/src/qpid/broker/amqp/Session.cpp
index 5573498..e512073 100644
--- a/src/qpid/broker/amqp/Session.cpp
+++ b/src/qpid/broker/amqp/Session.cpp
@@ -955,13 +955,17 @@ void IncomingToExchange::handle(qpid::broker::Message& message, qpid::broker::Tx
{
if (exchange->isDestroyed())
throw qpid::framing::ResourceDeletedException(QPID_MSG("Exchange " << exchange->getName() << " has been deleted."));
- authorise.route(exchange, message);
- DeliverableMessage deliverable(message, transaction);
- exchange->route(deliverable);
- if (!deliverable.delivered) {
- if (exchange->getAlternate()) {
- exchange->getAlternate()->route(deliverable);
+ try {
+ authorise.route(exchange, message);
+ DeliverableMessage deliverable(message, transaction);
+ exchange->route(deliverable);
+ if (!deliverable.delivered) {
+ if (exchange->getAlternate()) {
+ exchange->getAlternate()->route(deliverable);
+ }
}
+ } catch (const qpid::SessionException& e) {
+ throw Exception(qpid::amqp::error_conditions::PRECONDITION_FAILED, e.what());
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org