From 8c2b2e9fa453b2daa81efd7a1b353332c9bf7971 Mon Sep 17 00:00:00 2001 From: "Charles E. Rolke" Date: Thu, 13 Mar 2014 21:12:32 +0000 Subject: QPID-5623: [C++ Messaging Client - amqp1.0] throws qpid::Exception instead of qpid::types::Exception Intercept the trap and rethrow in proper format. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1577322 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/qpid/messaging/amqp/ConnectionHandle.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/qpid/cpp/src/qpid/messaging/amqp/ConnectionHandle.cpp b/qpid/cpp/src/qpid/messaging/amqp/ConnectionHandle.cpp index c1ab108a61..90227fa29b 100644 --- a/qpid/cpp/src/qpid/messaging/amqp/ConnectionHandle.cpp +++ b/qpid/cpp/src/qpid/messaging/amqp/ConnectionHandle.cpp @@ -31,7 +31,13 @@ namespace amqp { namespace { ConnectionImpl* create(const std::string& u, const qpid::types::Variant::Map& o) { - return new ConnectionHandle(u, o); + try { + return new ConnectionHandle(u, o); + } catch (const types::Exception& ) { + throw; + } catch (const qpid::Exception& e) { + throw messaging::ConnectionError( e.what() ); + } } struct StaticInit -- cgit v1.2.1