<exception>
The <exception>
header declares classes, types, and functions related to
fundamental exception handling. See <stdexcept>
for additional exception
classes.
Note
This section describes a complicated system of exceptions, function calls, and handlers. The end result is simpler than it might seem at first:
A function can throw only the exception types listed in its exception specification, or else the program terminates immediately.
If a function does not have an exception specification, it can throw any exception. (Virtual functions work a little differently; see Chapter 6 for details.)
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.