catch_stm Production

Definition

catch_stm : outer_stm catch_list final inner_stm
          | outer_stm catch_list
          | exp catch_list final inner_stm
          | exp catch_list

Purpose

A catch_stm declares a handler for exceptions. A catch_stm may optionally have a final block, which is executed after the handler for any exception.

Semantics

The same exception may not be caught twice, and two catch-all statements cannot be declared.