Mega Code Archive
The ORA_IS_SERVERERROR returns a true or false value as a BOOLEAN datatype when the error is on the error stack
SQL>
SQL>
SQL> BEGIN
2 IF ora_is_servererror(4082) THEN
3 dbms_output.put_line('ORA-04082 error thrown.');
4 END IF;
5 END;
6 /
PL/SQL procedure successfully completed.
SQL>