PROCEDURE check_tawreed(raqmtawriedE IN NUMBER,raqmmawrade in number,daleel in number)is
var_tawreed asnaf_rec;
var_amr amr_tawried%rowtype;
my_exc exception;
my_ex_2 exception;
my_ex_3 exception;
begin
open curs_amr(raqmtawriede);
fetch curs_amr into var_amr;
if curs_amr%notfound then
raise my_exc;
end if;
/* if var_amr.open = 1 then
raise my_ex_2;
end if; */
if var_amr.RAQMMAWRAD <> raqmmawrade then
raise my_ex_3;
end if;
close curs_check_tawreed;
close curs_amr;
exception
when my_exc then
close curs_check_tawreed;
raise_application_error(-20203,' a1');
when my_ex_2 then
close curs_check_tawreed;
raise_application_error(-20203,'a2');
when my_ex_3 then
close curs_check_tawreed;
raise_application_error(-20203,' a3');
end check_tawreed;
here is the calling procedure
PROCEDURE dELtawreed(raqmtawriede in number) is
var_i number(1);
var_up shra_tawried%rowtype;
var_amr amr_tawried%rowtype;
my_exc exception;
BEGIN
if raqmtawreede = var_up.raqmtawried then
nmawardeen.check_tawreed(raqmtawreede,amiel,0);
elsif raqmtawreede > var_up.raqmtawried then
delete from shra_tawried where raqmfatoura = raqmtawriede;
else
raise my_exc;
end if;
commit;
exception
when my_exc then
close curs_check_tawreed;
raise_application_error(-20203,' a1');
end dELtawreed;
when i execute dELtawreed and a handeled exception occurs in check_tawreed(for example my_ex_2)i get the following message 'error an error had occured taht is not handelled' although there is handeler for the exception in check_tawreed.how can i propgate the error message to dELtawreed.
thanks in advance
ahmad