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

Handling Errors in User-Named Triggers

User-named triggers are invoked by calling the EXECUTE_TRIGGER Built-in subprogram:

/* Built-in Trigger: */
statement a;
Execute_Trigger('my_user_named_trigger');
statement b;

When an unhandled exception is raised in a user-named trigger, the user-named trigger fails, but the exception does not propagate to the calling trigger. Rather, Oracle Forms treats the failure as an error in the Built-in procedure EXECUTE_TRIGGER, and sets the return values of the Built-in error functions accordingly. Thus, the outcome of a user-named trigger can be trapped in the same way as a call to any other Built-in subprogram; that is, by evaluating the Built-in error functions:

/* Built-in Trigger: */
statement a;
Execute_Trigger('my_usernamed_trigger');
IF NOT Form_Success THEN
 RAISE Form_Trigger_Failure;
END IF;
statement b;

About using PL/SQL exception handling in triggers

About trigger failure results

About evaluating the success or failure of Built-ins

Handling errors in Built-in subprograms

Error handling for stored procedures

User-defined exceptions