Hello,
I have the following code where I am specifying raise_application error when condition is true so that exception will raise in my java code with matching error_code
20122. But I have noticed that error is getting logged in my db_table which I have specified in EXCEPTION WHEN OTHERS
THEN.
I would like to know why there is no exception is getting raised in java class with error code 20122
PLSQL Code.
BEGIN
IF (value > 0)
THEN
raise_application_error (-20122, 'DB Commit Not Allowed');
END IF;
___
EXCEPTION
WHEN NO_DATA_FOUND
THEN
NULL;
WHEN OTHERS
THEN
insert into db_errors values(DBMS_UTILITY.format_error_backtrace,SQLERRM);
Thanks