From 969f92e501905559843e4949b23b3ab47e335fbc 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/qpid@1577322 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/messaging/amqp/ConnectionHandle.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'cpp/src') diff --git a/cpp/src/qpid/messaging/amqp/ConnectionHandle.cpp b/cpp/src/qpid/messaging/amqp/ConnectionHandle.cpp index c1ab108a61..90227fa29b 100644 --- a/cpp/src/qpid/messaging/amqp/ConnectionHandle.cpp +++ b/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