When you arm an exception handler using the on exception instruction, note the following points.
Any database transaction that is in progress is not aborted.
You must explicitly code an abortTransaction instruction within the exception handler if the database transaction in progress is also to be aborted.
The method-call-expression identifier can be in the form:
object-reference-expression.method-identifier
In this case, method-identifier is invoked for the specified object if an exception occurs.
The method-call-expression identifier can be in the form method-identifier, in which case method-identifier is invoked for the object upon which the method arming the exception handler is invoked.
The method used to arm an exception handler can have parameters in addition to the exception parameter, which refers to the exception object created and passed when the exception was raised. For example, you could specify an optional parameter that refers to the current object and an optional parameter that refers to an integer variable; for example:
on Exception do exceptionHandler(exception, currentObj, n);
The exception object must be the first parameter that you specify when arming an exception handler.