Name
uncaught_exception function — Determines whether exception handling is currently underway
Synopsis
bool uncaught_exception( )
The uncaught_exception
function returns true
while an
exception is processed: after evaluating the argument of a throw
expression but before a matching
exception declaration is initialized in a catch
block. It also returns true
after terminate
is called (but not for an
explicit call to terminate
). It
returns false
at other
times.
Call uncaught_exception
to
learn whether exception handling is currently underway. If it
returns true
, throwing a new
exception results in a call to terminate
.
See Also
terminate function,
catch
keyword, throw
keyword
Get C++ In a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.