diff options
| author | Charles E. Rolke <chug@apache.org> | 2014-03-13 21:12:32 +0000 |
|---|---|---|
| committer | Charles E. Rolke <chug@apache.org> | 2014-03-13 21:12:32 +0000 |
| commit | 969f92e501905559843e4949b23b3ab47e335fbc (patch) | |
| tree | 1c56ab0458f0fc9650de07255ef182caf0b1f759 /cpp/src | |
| parent | e34631082392fa4d0c5d37e3cc1af138a07d8ebb (diff) | |
| download | qpid-python-969f92e501905559843e4949b23b3ab47e335fbc.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/qpid@1577322 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
| -rw-r--r-- | cpp/src/qpid/messaging/amqp/ConnectionHandle.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
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 |
