Defined in header <stdexcept> | ||
---|---|---|
template< class T > class tx_exception : public std::runtime_error; | (TM TS) |
Defines an exception type that can be used to cancel and roll back an atomic transaction initiated by the keyword atomic_cancel
.
If T
is not TriviallyCopyable
, the program that specializes std::tx_exception<T>
is ill-formed.
explicit tx_exception( T value ) transaction_safe; | (1) | |
tx_exception( T value, const std::string& what_arg ) transaction_safe; | (2) | |
tx_exception( T value, const char* what_arg ) transaction_safe; | (3) |
Constructs the exception object with what_arg
as explanatory string that can be accessed through what()
and value
as the object that can be accessed through get()
.
value | - | payload object |
what_arg | - | explanatory string |
(none).
T get() const transaction_safe; |
Returns the payload object object held by the exception object.
(none).
[virtual] | destructs the exception object (virtual public member function of std::exception ) |
[virtual] | returns an explanatory string (virtual public member function of std::exception ) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/error/tx_exception