A script-enabled browser is required for this page to function properly.

About Evaluating the Success or Failure of Built-ins

A Built-in subprogram can have one of three outcomes: success, failure, or fatal error. When a Built-in subprogram fails, a runtime error occurs, and Oracle Forms responds by issuing the appropriate error message. However, no exception is raised in the trigger. For this reason, the trigger itself does not fail, and any subsequent statements in the trigger are executed.

When you call Built-in subprograms in triggers, you will often want to trap the success or failure of the subprogram so that you can either correct any errors or cause the trigger to fail explicitly. This is particularly true when subsequent trigger statements depend on the successful outcome of a preceding Built-in subprogram.

To trap the success or failure of a Built-in subprogram, use the following Oracle Forms Built-in functions:

These functions report on the outcome of the most recently executed Built-in subprogram. In the following When-Button-Pressed trigger, the function FORM_SUCCESS is used to test the outcome of the GO_BLOCK Built-in procedure:

GO_BLOCK('orders');
IF NOT FORM_SUCCESS THEN
--handle the error
END IF;

This test detects both fatal and failure-type errors, and so is more encompassing than FORM_FAILURE or FORM_FATAL used alone.


About Handling Runtime Errors in Triggers

FORM_SUCCESS Built-in

FORM_FAILURE Built-in

FORM_FATAL Built-in