From 91a104cfe511c4448a6aaaed6308632d912e9594 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Mon, 1 Aug 2011 16:06:30 +0000 Subject: 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 --- cpp/src/qpid/client/ConnectionHandler.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cpp/src/qpid/client/ConnectionHandler.cpp') 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); } } -- cgit v1.2.1