cpp/error/unexpected handler

is the function pointer type (pointer to function that takes no arguments and returns void), which is installed and queried by the functions std and std and called by std.

The C++ implementation provides a default function, which calls. If the null pointer value is installed (by means of std), the implementation may restore the default handler instead.

A user-defined is expected to either terminate the program or throw an exception. If it throws an exception, one of the following three situations may be encountered:

1) the exception thrown by satisfies the dynamic exception specification that was violated earlier. The new exception is allowed to escape the function and stack unwinding continues.

2) the exception thrown by still violates the exception specification:

2a) however, the exception specification allows std: the thrown exception object is destroyed, and std is constructed by the C++ runtime and thrown instead.

2b) the exception specification does not allow std: is called.