 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
When
an exception occurs and either: (1)
no try block
|
|
|
statically
surrounds the throw point or (2) no catch
|
|
|
blocks
are found that match the type of exception
|
|
|
thrown
when a try block is present, then a process called
|
|
stack
unwinding begins.
|
|
| • |
If we
are in a function, any automatic variables and
|
|
|
formal
arguments on the stack are destroyed in the same
|
|
|
way
as when control returns from a function.
|
|
| • |
But,
instead of returning control to the calling function,
|
|
|
that
function is searched for a dynamically surrounding
|
|
|
try
block.
|
|
| • |
If
found, its associated catch block(s) are checked for a
|
|
|
type
matching the exception.
|
|