- (1)
- A raise_statement raises an exception.
(2)
raise_statement ::= raise [exception_name];
Legality Rules
- (3)
- The name, if any, in a raise_statement shall denote an exception. A
raise_statement with no exception_name (that is, a re-raise statement) shall
be within a handler, but not within a body enclosed by that handler.
Dynamic Semantics
- (4)
- To raise an exception is to raise a new occurrence of that exception, as
explained in 11.4. For the execution of a raise_statement
with an exception_name, the named exception is raised. For the execution of
a re-raise statement, the exception occurrence that caused transfer of control
to the innermost enclosing handler is raised again.
Examples
- (5)
- Examples of raise statements:
(6)
raise Ada.IO_Exceptions.Name_Error; -- see A.13
(7)
raise; -- re-raise the current exception
-- Email comments, additions, corrections, gripes, kudos, etc. to:
Magnus Kempe -- Magnus.Kempe@di.epfl.ch
Copyright statement
Page last generated: 95-03-12