 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
First,
a catch block is only executed as a result of
|
|
|
throwing
an exception within a try block.
|
|
| • |
Second,
if a throw is executed, control is immediately
|
|
|
passed
to the appropriate catch block.
|
|
| • |
The
statements following the throw are not executed.
|
|
| • |
Third,
when the catch block is done executing, control
|
|
|
goes
to the statement immediately following the try block
|
|
and
associated sequence of catch blocks in which the
|
|
|
exception
was handled; it does not continue with the
|
|
|
statement
following the throw.
|
|
| • |
Of
course, if a catch block contains a return, exit, or
|
|
|
abort,
then the program either returns from the function
|
|
|
containing
the catch block or exits the program.
|
|