What is Pragma Init Exception in oracle? Difference between user defined exception and init pragma exception ? Thank you.
What is Pragma Init Exception in oracle? Difference between user defined exception and init pragma exception ? Thank you.
It's actually PRAGMA EXCEPTION_INIT (, ) and it's a pre-compiler directive on how to set up for error handling.
From "Oracle Database 11g PL/SQL Programming" by Michael McLaughlin...
The example program ddefines an EXCEPTION variable and mapes the exception to an error number...
declare
a varchar2 (20);
invalid_userenv_param exception;
pragma exception_init(invalid_userenv_param,-2003);
begin
a := sys_context('userenv','proxy_pusher');
exception
when invalid_userenv_param then
dbms_output.put_line(sqlerrm);
end;
/
No one has followed this question yet.