19 #include <boost/optional.hpp> 21 #include <couchbase/transactions/transaction_result.hxx> 27 namespace transactions
31 class transaction_context;
33 enum external_exception {
35 ACTIVE_TRANSACTION_RECORD_ENTRY_NOT_FOUND,
36 ACTIVE_TRANSACTION_RECORD_FULL,
37 ACTIVE_TRANSACTION_RECORD_NOT_FOUND,
38 DOCUMENT_ALREADY_IN_TRANSACTION,
39 DOCUMENT_EXISTS_EXCEPTION,
40 DOCUMENT_NOT_FOUND_EXCEPTION,
42 FEATURE_NOT_AVAILABLE_EXCEPTION,
43 TRANSACTION_ABORTED_EXTERNALLY,
44 PREVIOUS_OPERATION_FAILED,
45 FORWARD_COMPATIBILITY_FAILURE
53 class transaction_exception :
public std::runtime_error
57 external_exception cause_;
83 external_exception
cause()
const 94 class transaction_failed :
public transaction_exception
Definition: bucket.hxx:33
Transaction expired.
Definition: exceptions.hxx:111
const transaction_result & get_transaction_result() const
Internal state of transaction at time of exception.
Definition: exceptions.hxx:74
Results of a transaction.
Definition: transaction_result.hxx:32
external_exception cause() const
The cause of the exception.
Definition: exceptions.hxx:84
Transaction failed.
Definition: exceptions.hxx:95
Base class for all exceptions expected to be raised from a transaction.
Definition: exceptions.hxx:54
Transaction commit ambiguous.
Definition: exceptions.hxx:127
transaction_exception(const std::runtime_error &cause, const transaction_context &context)
Construct from underlying exception.