|
|
Defined in header <stdexcept> | ||
template<class T> class tx_exception:publicstd::runtime_error; | (TM TS) | |
Defines an exception type that can be used to cancel and roll back an atomic transaction initiated by the keywordatomic_cancel.
IfT
is notTriviallyCopyable, the program that specializesstd::tx_exception<T>
is ill-formed.
Contents |
explicit tx_exception( T value) transaction_safe; | (1) | (TM TS) |
tx_exception( T value,conststd::string& what_arg) transaction_safe; | (2) | (TM TS) |
tx_exception( T value,constchar* what_arg) transaction_safe; | (3) | (TM TS) |
tx_exception(const tx_exception& other) transaction_safenoexcept; | (4) | (TM TS) |
std::tx_exception<T>
thenstd::strcmp(what(), other.what())==0.value | - | payload object |
what_arg | - | explanatory string |
other | - | another exception object to copy |
tx_exception& operator=(const tx_exception& other) transaction_safenoexcept; | (TM TS) | |
Assigns the contents with those ofother. If*this andother both have dynamic typestd::tx_exception<T>
thenstd::strcmp(what(), other.what())==0 after assignment.
other | - | another exception object to assign with |
*this
T get()const transaction_safe; | (TM TS) | |
Returns the payload object held by the exception object.
May throw implementation-defined exceptions.
virtualconstchar* what()const transaction_safe_dynamicnoexcept; | (TM TS) | |
Returns the explanatory string.
(none)
Pointer to a null-terminated string with explanatory information.
[virtual] | destroys the exception object (virtual public member function of std::exception )[edit] |
[virtual] | returns an explanatory string (virtual public member function of std::exception )[edit] |