Couchbase Transactions C++ Client  1.0.0
Transactions client for couchbase
Public Member Functions | List of all members
couchbase::transactions::transaction_exception Class Reference

Base class for all exceptions expected to be raised from a transaction. More...

#include <exceptions.hxx>

Inheritance diagram for couchbase::transactions::transaction_exception:
couchbase::transactions::transaction_commit_ambiguous couchbase::transactions::transaction_expired couchbase::transactions::transaction_failed

Public Member Functions

 transaction_exception (const std::runtime_error &cause, const transaction_context &context)
 Construct from underlying exception. More...
 
const transaction_resultget_transaction_result () const
 Internal state of transaction at time of exception. More...
 
external_exception cause () const
 The cause of the exception. More...
 

Detailed Description

Base class for all exceptions expected to be raised from a transaction.

Subclasses of this are the only exceptions that are raised out of the transaction lambda.

Constructor & Destructor Documentation

◆ transaction_exception()

couchbase::transactions::transaction_exception::transaction_exception ( const std::runtime_error &  cause,
const transaction_context &  context 
)
explicit

Construct from underlying exception.

Parameters
causeUnderlying cause for this exception.
contextThe internal state of the transaction at the time of the exception.

Member Function Documentation

◆ cause()

external_exception couchbase::transactions::transaction_exception::cause ( ) const
inline

The cause of the exception.

Returns
The underlying cause for this exception.

◆ get_transaction_result()

const transaction_result& couchbase::transactions::transaction_exception::get_transaction_result ( ) const
inline

Internal state of transaction at time of exception.

Returns
Internal state of transaction.

The documentation for this class was generated from the following file: