summaryrefslogtreecommitdiff
path: root/qpid/cpp/include
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp/include')
-rw-r--r--qpid/cpp/include/qpid/messaging/Session.h3
-rw-r--r--qpid/cpp/include/qpid/messaging/exceptions.h16
2 files changed, 16 insertions, 3 deletions
diff --git a/qpid/cpp/include/qpid/messaging/Session.h b/qpid/cpp/include/qpid/messaging/Session.h
index 94522e4c13..999af7c65b 100644
--- a/qpid/cpp/include/qpid/messaging/Session.h
+++ b/qpid/cpp/include/qpid/messaging/Session.h
@@ -65,7 +65,8 @@ class QPID_MESSAGING_CLASS_EXTERN Session : public qpid::messaging::Handle<Sessi
/**
* Commits the sessions transaction.
*
- * @exception TransactionAborted if the original session is lost
+ * @exception TransactionAborted if the transaction was rolled back due to an error.
+ * @exception TransactionUnknown if the connection was lost and the transaction outcome is unknown.
* forcing an automatic rollback.
*/
QPID_MESSAGING_EXTERN void commit();
diff --git a/qpid/cpp/include/qpid/messaging/exceptions.h b/qpid/cpp/include/qpid/messaging/exceptions.h
index d5527cdd63..391eb11db9 100644
--- a/qpid/cpp/include/qpid/messaging/exceptions.h
+++ b/qpid/cpp/include/qpid/messaging/exceptions.h
@@ -180,14 +180,16 @@ struct QPID_MESSAGING_CLASS_EXTERN SessionClosed : public SessionError
QPID_MESSAGING_EXTERN SessionClosed();
};
+/** Base class for transactional errors */
struct QPID_MESSAGING_CLASS_EXTERN TransactionError : public SessionError
{
QPID_MESSAGING_EXTERN TransactionError(const std::string&);
};
/**
- * Thrown on Session::commit() if reconnection results in the
- * transaction being automatically aborted.
+ * The transaction was automatically rolled back. This could be due to an error
+ * on the broker, such as a store failure, or a connection failure during the
+ * transaction
*/
struct QPID_MESSAGING_CLASS_EXTERN TransactionAborted : public TransactionError
{
@@ -195,6 +197,16 @@ struct QPID_MESSAGING_CLASS_EXTERN TransactionAborted : public TransactionError
};
/**
+ * The outcome of the transaction on the broker, commit or roll-back, is not
+ * known. This occurs when the connection fails after we sent the commit but
+ * before we received a result.
+ */
+struct QPID_MESSAGING_CLASS_EXTERN TransactionUnknown : public TransactionError
+{
+ QPID_MESSAGING_EXTERN TransactionUnknown(const std::string&);
+};
+
+/**
* Thrown to indicate that the application attempted to do something
* for which it was not authorised by its peer.
*/