Returns the error message type for the action most recently performed during the current Runform session.
FUNCTION ERROR_TYPE;
Built-in Type unrestricted function
Returns ERROR_TYPE returns one of the following values for the error message type:
FRM Indicates an Oracle Forms error.
ORA Indicates an ORACLE error.
Enter Query Mode yes
none
You can use this function to do one of the following:
To get the correct results in either type of test, you must perform the test immediately after the action executes, before any other action occurs.
/*
** Built-in: ERROR_CODE,ERROR_TEXT,ERROR_TYPE
** Example: Reword certain FRM error messages by checking
** the Error_Code in an ON-ERROR trigger
** Trigger: On-Error
*/
DECLARE
errnum NUMBER := ERROR_CODE;
errtxt VARCHAR2(80) := ERROR_TEXT;
errtyp VARCHAR2(3) := ERROR_TYPE;
BEGIN
IF errnum = 40107 THEN
Message('You cannot navigate to this non-displayed item...
Try again.');
ELSIF errnum = 40109 THEN
Message('If you want to leave this block,
you must first cancel Enter Query mode.');
ELSE
/*
** Print the Normal Message that would have appeared
**
** Default Error Message Text Goes Here
*/
Message(errtyp||'-'||TO_CHAR(errnum)||': '||errtxt);
RAISE Form_Trigger_Failure;
END IF;
END;