Brother,
Eu havia feito da forma que lhe passei e, deu certo sim.
O que você deve atentar, é o seguinte:
Às vezes, a mensagem não é de ERRO, então, você deve, obrigatoriamente, utilizar o
ON-MESSAGE ao invés da
ON-ERROR.
Mas, neste caso, tente adaptá-la (40501) ao exemplo que vem no HELP do Forms:
Selecionar tudo
** 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 = 40301 THEN
Message('Your search criteria identified no matches...
Try Again.');
ELSIF errnum = 40350 THEN
Message('Your selection does not correspond to an employee.');
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;
Sinceramente, acho muito mais interessante do que criar uma tabela para tal.
Fica ai a dica, qualquer coisa, conta com a gente.