bool uncaught_exception() throw();
bool uncaught_exception() noexcept;
Return exception status
Returns true if an exception has been thrown but the initialization of the exception declaration in the matching handler (including an automatic call to unexpected or terminate) is not yet complete.

Returns false in all other cases, including when unexpected or terminate is explicitly called by the program.

Throwing another exception while this function returns true may result in the termination of the exception handling proccess (i.e., an automatic call to terminate).

Return value

true if an exception has been thrown and has not yet been handled by its appropriate catch handler, including stack unwinding.
false otherwise.

Exception safety

No-throw guarantee: this function never throws exceptions.

See also