17.3. Rethrowing an Exception
A function might use a resource—like a file—and might want to release the resource (i.e., close the file) if an exception occurs. An exception handler, upon receiving an exception, can release the resource then notify its caller than an exception occurred by rethrowing the exception via the statement
Regardless of whether a handler can process an exception, the handler can rethrow the exception for further processing outside the handler. The next enclosing
try block detects the rethrown exception, which a
catch handler listed after that enclosing
try block attempts to handle.
Common Programming Error 17.5 ...