try statement executes a block. If a value is thrown and the
try statement has one or more
catch clauses that can catch it, then control will be transferred to the first such
catch clause. If the
try statement has a
finally clause, then another block of code is executed, no matter whether the
try block completes normally or abruptly, and no matter whether a
catch clause is first given control.
try Block Catches
try Block Catchesopt Finally TryWithResourcesStatementCatches: CatchClause Catches CatchClauseCatchClause:
catch ( CatchFormalParameter
) BlockCatchFormalParameter: VariableModifiersopt CatchType VariableDeclaratorIdCatchType: ClassType ClassType
| CatchTypeFinally: ...