Namespaces
Variants

std:: tx_exception

From cppreference.net
헤더 파일에 정의됨 <stdexcept>
template < class T >
class tx_exception : public std:: runtime_error ;
(TM TS)

atomic_cancel 키워드로 시작된 atomic 트랜잭션을 취소하고 롤백하는 데 사용할 수 있는 예외 타입을 정의합니다.

만약 T TriviallyCopyable 가 아닌 경우, std::tx_exception<T> 를 특수화하는 프로그램은 형식이 잘못되었습니다.

목차

멤버 함수

std::tx_exception:: tx_exception

explicit tx_exception ( T value ) transaction_safe ;
(1) (TM TS)
tx_exception ( T value, const std:: string & what_arg ) transaction_safe ;
(2) (TM TS)
tx_exception ( T value, const char * what_arg ) transaction_safe ;
(3) (TM TS)
tx_exception ( const tx_exception & other ) transaction_safe noexcept ;
(4) (TM TS)
1-3) 예외 객체를 생성합니다. what_arg what() 을 통해 접근 가능한 설명 문자열이고, value get() 을 통해 접근 가능한 객체입니다.
4) 복사 생성자입니다. * this other 모두 동적 타입이 std::tx_exception<T> 인 경우 std:: strcmp ( what ( ) , other. what ( ) ) == 0 입니다.

매개변수

value - 페이로드 객체
what_arg - 설명 문자열
other - 복사할 다른 예외 객체

예외

1-3) 구현에서 정의된 예외를 던질 수 있습니다.

std::tx_exception:: operator=

tx_exception & operator = ( const tx_exception & other ) transaction_safe noexcept ;
(TM TS)

other 의 내용으로 할당합니다. * this other 모두 동적 타입 std::tx_exception<T> 를 가지고 있다면, 할당 후 std:: strcmp ( what ( ) , other. what ( ) ) == 0 입니다.

매개변수

other - 할당할 다른 예외 객체

반환값

* this

std::tx_exception:: get

T get ( ) const transaction_safe ;
(TM TS)

예외 객체가 보유한 페이로드 객체를 반환합니다.

예외

구현에서 정의된 예외를 발생시킬 수 있습니다.

std::tx_exception:: what

virtual const char * what ( ) const transaction_safe_dynamic noexcept ;
(TM TS)

설명 문자열을 반환합니다.

매개변수

(없음)

반환 값

설명 정보를 포함하는 null로 종료된 문자열에 대한 포인터.

std:: runtime_error 에서 상속됨


std:: exception 로부터 상속됨

멤버 함수

[virtual]
예외 객체를 파괴함
( std::exception 의 virtual public 멤버 함수)
[virtual]
설명 문자열을 반환함
( std::exception 의 virtual public 멤버 함수)