October 1997
Intermediate to advanced
800 pages
20h 48m
English
Exception specifications state which exceptions a function may throw, either directly or indirectly. When a function throws an exception that does not appear in the function's exception specification, the exception is unexpected. By default, the exception mechanism calls unexpected(), which calls terminate() to stop your program. This section explores unexpected exceptions in more detail and shows you strategies for handling them in applications.
The exception mechanism calls unexpected() for thrown exceptions that do not appear in a function's exception specification. The unexpected() function executes abort(), which terminates your program without calling any object destructors. The set_unexpected() ...