summaryrefslogtreecommitdiff
path: root/cpp/include/qpid
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2014-03-19 19:40:40 +0000
committerAndrew Stitcher <astitcher@apache.org>2014-03-19 19:40:40 +0000
commit4a48ce6fb6c4c0c48bfd8a739a9a058e130b705f (patch)
tree5b70da5d6e07d57107669fa0b3082a5ad48b8379 /cpp/include/qpid
parentc3fcffb903c398c2835455490a8fc6448fe95976 (diff)
downloadqpid-python-4a48ce6fb6c4c0c48bfd8a739a9a058e130b705f.tar.gz
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/qpid@1579367 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/include/qpid')
-rw-r--r--cpp/include/qpid/messaging/exceptions.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/cpp/include/qpid/messaging/exceptions.h b/cpp/include/qpid/messaging/exceptions.h
index a9fa8e2506..6c65f4a889 100644
--- a/cpp/include/qpid/messaging/exceptions.h
+++ b/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&);