Generic error handling to handle any type of error
SQL>
SQL> declare
2 str varchar2(50);
3 begin
4 str := 'CAT';
5 exception
6 when others then
7 raise_application_error (-20100, 'error#' || sqlcode || ' desc: ' || sqlerrm);
8 end;
9 /
PL/SQL procedure successfully completed.
SQL>
SQL>
SQL>
Related examples in the same category