Envoyé par
Les saintes écritures du C++
In the following situations exception handling must be abandoned for less subtle error handling techniques:
— when the exception handling mechanism, after completing evaluation of the expression to be thrown but before the exception is caught (15.1), calls a user function that exits via an uncaught exception,134)
— when the exception handling mechanism cannot find a handler for a thrown exception (15.3), or
— when the destruction of an object during stack unwinding (15.2) exits using an exception, or
— when construction or destruction of a nonlocal object with static storage duration exits using an exception (3.6.2), or
— when execution of a function registered with atexit exits using an exception (18.3), or
— when a throwexpression with no operand attempts to rethrow an exception and no exception is being handled (15.1), or
— when unexpected throws an exception which is not allowed by the previously violated exceptionspecification, and std::bad_exception is not included in that exceptionspecification (15.5.2), or
— when the implementation’s default unexpected_handler is called (18.6.2.2)
In such cases, void terminate(); is called (18.6.3).
Partager