used defined exception : Your own Exception « PL SQL « Oracle PL / SQL






used defined exception

 
SQL>
SQL>  declare
  2        NESTED_EXCEPTION exception;
  3   begin
  4
  5        raise NESTED_EXCEPTION;
  6
  7    exception
  8
  9      when NESTED_EXCEPTION then
 10        dbms_output.put_line('NESTED_EXCEPTION caught!');
 11    end;
 12    /
NESTED_EXCEPTION caught!

PL/SQL procedure successfully completed.

SQL>
SQL>

 








Related examples in the same category

1.Define and use your own exception
2.How to define your own exception
3.Using SQLCODE and SQLERRM
4.Handling a user-defined exception
5.Raise User-defined exceptions
6.Insert Exception message to an audit table