summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/ConnectionHandler.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2011-08-01 16:06:30 +0000
committerGordon Sim <gsim@apache.org>2011-08-01 16:06:30 +0000
commit91a104cfe511c4448a6aaaed6308632d912e9594 (patch)
tree7e77ae5f13805cb7c14f2bf2b7e7f36318aa48a3 /cpp/src/qpid/client/ConnectionHandler.cpp
parentdbaedebe0bd8cbf041727be0aeae7a27bf8961f3 (diff)
downloadqpid-python-91a104cfe511c4448a6aaaed6308632d912e9594.tar.gz
QPID-3382: Corrected some exception types for connect errors
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1152853 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/ConnectionHandler.cpp')
-rw-r--r--cpp/src/qpid/client/ConnectionHandler.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/cpp/src/qpid/client/ConnectionHandler.cpp b/cpp/src/qpid/client/ConnectionHandler.cpp
index 4fbf55aa60..801fe38051 100644
--- a/cpp/src/qpid/client/ConnectionHandler.cpp
+++ b/cpp/src/qpid/client/ConnectionHandler.cpp
@@ -143,7 +143,9 @@ void ConnectionHandler::outgoing(AMQFrame& frame)
void ConnectionHandler::waitForOpen()
{
waitFor(ESTABLISHED);
- if (getState() == FAILED || getState() == CLOSED) {
+ if (getState() == FAILED) {
+ throw TransportFailure(errorText);
+ } else if (getState() == CLOSED) {
throw ConnectionException(errorCode, errorText);
}
}