The statement
EXIT
raises the exit-exception. An EXIT statement must be textually
enclosed by a LOOP, WHILE, REPEAT, or FOR
statement.
We define EXIT and RETURN in terms of exceptions in order to
specify their interaction with the exception handling statements. As a
pathological example, consider the following code, which is an elaborate
infinite loop:
LOOP
TRY
TRY EXIT FINALLY RAISE E END
EXCEPT
E => (*skip*)
END
END