unexpected(<exception>)
Calls the unexpected handler.
void unexpected( );
설명
C++ 표준에서는 함수가 목록에 포함 되지 않은 예외가 throw 될 때 unexpected 를 호출하는 것이 필요합니다. 현재 구현에서 이 부분이 지원되지 않는 경우 The example calls unexpected directly, which calls the unexpected handler.
The function calls an unexpected handler, a function of type void. If unexpected is called directly by the program, the unexpected handler is the one most recently set by a call to set_unexpected.
An unexpected handler may not return to its caller. It may terminate execution by:
Throwing an object of a type listed in the exception specification or an object of any type if the unexpected handler is called directly by the program.
Throwing an object of type bad_exception.
Calling terminate, abort or exit(int).
At program startup, the unexpected handler is a function that calls terminate.
예제
See set_unexpected for an example of the use of unexpected.
요구 사항
Header: <exception>
네임스페이스: std