From c6e0ff9682d253b95e553c4e7d9038c014c84368 Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Wed, 19 Mar 2014 19:40:40 +0000 Subject: QPID-5586: Introduce SessionClosed exception - use it for qpid::messaging::Session::nextReceiver to ensure that closing a connection/session can be distinguished. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1579367 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/include/qpid/messaging/exceptions.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'qpid/cpp/include') diff --git a/qpid/cpp/include/qpid/messaging/exceptions.h b/qpid/cpp/include/qpid/messaging/exceptions.h index a9fa8e2506..6c65f4a889 100644 --- a/qpid/cpp/include/qpid/messaging/exceptions.h +++ b/qpid/cpp/include/qpid/messaging/exceptions.h @@ -151,6 +151,16 @@ struct QPID_MESSAGING_CLASS_EXTERN SessionError : public MessagingException QPID_MESSAGING_EXTERN SessionError(const std::string&); }; +/** + * Thrown to indicate that the sesion was closed by this client (probably in + * a different thread) whilst we were waiting on it. This is not really an + * error condition but there is no other way to return this. + */ +struct QPID_MESSAGING_CLASS_EXTERN SessionClosed : public SessionError +{ + QPID_MESSAGING_EXTERN SessionClosed(); +}; + struct QPID_MESSAGING_CLASS_EXTERN TransactionError : public SessionError { QPID_MESSAGING_EXTERN TransactionError(const std::string&); -- cgit v1.2.1