I have my own custom alert function. It At the data block level, I have this in the ON-INSERT trigger:
custom_alert.show( 'begin insert' );
BEGIN
INSERT_RECORD;
custom_alert.show( 'insert successful' );
EXCEPTION
custom_alert.show( 'insert failed: ' || SQLCODE || ',' || SQLERRM );
RAISE;
END;
I force an error by purposely trying to insert a record with no data in a NOT NULL contraint field. When I commit this record, I see the following sequence:
my custom alert with the message "begin insert".
I press OK and then see my custom alert "insert successful" at the same time the status message in the form says, "FRM-40508: ORACLE error: unable to INSERT record."
I press OK and then see an Oracle generated alert with the message, "FRM-40508: ORACLE error: unable to INSERT record."
Basically, the error is not being caught by the exception clause.
Is there a solution to this?
Darren