다음을 통해 공유


nested_exception 클래스

클래스는 여러 상속과 함께 사용하기 위한 예외를 설명합니다. 현재 처리된 예외를 캡처하고 나중에 사용하기 위해 저장합니다.

구문

class nested_exception {
    public:
        nested_exception();
        nested_exception(const nested_exception&) = default;
        virtual ~nested_exception() = default; // access functions
};

멤버

연산자

이름 설명
operator= 대입 연산자입니다.

함수

속성 설명
rethrow_nested 저장된 예외를 throw합니다.
nested_ptr 저장된 예외를 반환합니다.

operator=

nested_exception& operator=(const nested_exception&) = default;

nested_ptr

exception_ptr nested_ptr() const;

Return Value

nested_exception 개체에서 캡처한 저장된 예외입니다.

rethrow_nested

[[noreturn]] void rethrow_nested() const;

설명

null 포인터를 반환하는 경우 nested_ptr() 함수는 .를 호출합니다 std::terminate(). 그렇지 않으면 에 의해 *this캡처된 저장된 예외를 throw합니다.

요구 사항

헤더:<예외>

네임스페이스: std

참고 항목

exception 클래스
C++ 표준 라이브러리의 스레드 보안