[Home] [Prev] [Next] [Index]

11.3 Raise Statements

11.3 Raise Statements

1
A raise statement raises an exception.

2
raise_statement ::= raise [exception_name];

3
For the execution of a raise statement with an exception name, the named exception is raised. A raise statement without an exception name is only allowed within an exception handler (but not within the sequence of statements of a subprogram, package, task unit, or generic unit, enclosed by the handler); it raises again the exception that caused transfer to the innermost enclosing handler.

4
Examples:

raise SINGULAR;
raise NUMERIC_ERROR;                         -- explicitly raising a predefined exception

raise; -- only within an exception handler

5
References:

*
exception 11

*
generic unit 12

*
name 4.1

*
package 7

*
sequence of statements 5.1

*
subprogram 6

*
task unit 9



[Home] [Prev] [Next] [Index]

documentation@rational.com
Copyright © 1993-2000, Rational Software Corporation. All rights reserved.