Can we have it. one common exception for all the procedures in on package.
e.g.
the package below , both procedure will raise zero_divide exception . so i've to write it once.
is it possible ??
create or replace package pack1 as
procedure p1;
procedure p2;
end;
/
create or replace package body pack1 as
procedure p1 is
n1 number;
n2 number := 0;
n3 number := 6;
begin
n1 := n3/n2;
exception
when zero_divide then
dbms_output.put_line ('MESSAGE ALL');
end;
procedure p2 is
n4 number;
n5 number :=0 ;
n6 number := 5;
begin
n4 := n6/n5;
exception
when zero_divide then
dbms_output.put_line ('MESSAGE ALL');
end;
end;
/
Santosh Jadhav
8i OCP DBA