summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles E. Rolke <chug@apache.org>2014-03-13 21:12:32 +0000
committerCharles E. Rolke <chug@apache.org>2014-03-13 21:12:32 +0000
commit8c2b2e9fa453b2daa81efd7a1b353332c9bf7971 (patch)
treef03b0e8c2d4dbb095d73528d9684e3da14d3ebea
parent20a5b4fada357aae2365e9155f3e23d787b0d00c (diff)
downloadqpid-python-8c2b2e9fa453b2daa81efd7a1b353332c9bf7971.tar.gz
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
-rw-r--r--qpid/cpp/src/qpid/messaging/amqp/ConnectionHandle.cpp8
1 files changed, 7 insertions, 1 deletions
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