diff options
| author | Alan Conway <aconway@apache.org> | 2010-05-12 13:41:41 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2010-05-12 13:41:41 +0000 |
| commit | 0fa302cbc61335e930bc78ed619973e1c0fcce83 (patch) | |
| tree | ac515ac9ad2ae9fe33dc4a5b535a6708f9449559 /cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp | |
| parent | d806f791323dd101705c86db17e6956aafb026f3 (diff) | |
| download | qpid-python-0fa302cbc61335e930bc78ed619973e1c0fcce83.tar.gz | |
Fixes to new API impl to support failover.
- client/SslConnector.cpp: throw ConnectionException for errors during connection.
- client/amqp0_10/ConnectionImpl.cpp: translate unknown exceptions to ConnectionError.
- client/amqp0_10/FailoverUpdates.cpp: interrupt receiver by closing session in dtor.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@943489 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp')
| -rw-r--r-- | cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp b/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp index a1f285f5a9..2c581e9d41 100644 --- a/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp +++ b/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp @@ -211,7 +211,11 @@ void ConnectionImpl::open() { qpid::sys::AbsTime start = qpid::sys::now(); qpid::sys::ScopedLock<qpid::sys::Semaphore> l(semaphore); - if (!connection.isOpen()) connect(start); + try { + if (!connection.isOpen()) connect(start); + } + catch (const types::Exception&) { throw; } + catch (const qpid::Exception& e) { throw messaging::ConnectionError(e.what()); } } bool expired(const qpid::sys::AbsTime& start, int64_t timeout) |
