Press "Enter" to skip to content

How to Suppress Error Message in Oracle Forms?

  • Below I am giving two examples to suppress the error messages in Oracle Forms, the first example is to suppress all the error messages and the second example is to suppress all the error messages but handle a specific error and give a custom message in Oracle Forms.

    Suppress all The Error Messages in Oracle Forms

    Write an ON-ERROR trigger at form level as shown below:

    Begin
       Null;
       /* it will simply do nothing on any error.*/
    End;

    Ignore All Error Message But Handle FRM-40202 (Field must be entered.)

    Write an ON-ERROR trigger at form level as shown below:

    Declare
       error_item varchar2(50);
       curr_item_label varchar2(100);
    Begin
       error_item := :system.trigger_item;
       if error_type = 'FRM' and error_code = 40202 then
          message(curr_item_label || ' cannot be left blank.');
          raise form_trigger_failure;
       else
          Null;
          -- ignore other errors
       end if; 
    end;

    See also: