Disarming a Local Exception Handler

A local exception handler normally remains armed for the duration of the method that armed it.

The following syntax disarms a local exception handler of a specified exception class.

on exception-class do null;

This disarms the last (or most recently armed) exception handler for exceptions of the specified exception class.

Care should be taken when disarming a local exception handler. The search for a handler for exceptions of the specified class is not limited to the current method. If a suitable exception handler is not found in the current method, the exception handlers in calling methods are also checked. The getExceptionHandlerStack method of the Process class can be used to determine what exception handlers are currently armed.