From fb1f5c770c551fe526adf5b860dd72cf5eb07311 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Fri, 6 Jun 2008 20:23:28 +0000 Subject: Added exceptions to sys::Waitable. Fixed client side deadlock involving client::Bounds. Fixed incorrect exception messages during connection shutdown. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@664114 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/client/ConnectionHandler.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (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 df1afb87a9..05f6bb9733 100644 --- a/cpp/src/qpid/client/ConnectionHandler.cpp +++ b/cpp/src/qpid/client/ConnectionHandler.cpp @@ -83,11 +83,10 @@ void ConnectionHandler::incoming(AMQFrame& frame) void ConnectionHandler::outgoing(AMQFrame& frame) { - if (getState() == OPEN) { + if (getState() == OPEN) out(frame); - } else { - throw Exception("Connection is not open."); - } + else + throw Exception(errorText.empty() ? "Connection is not open." : errorText); } void ConnectionHandler::waitForOpen() -- cgit v1.2.1