This is a question about best practices. I have a PL / SQL block like this
DECLARE
PROCEDURE p1(in_parameter1, out_parameter1, out_parameter2...) IS
BEGIN
END;
PROCEDURE p2(in_parameter1, out_parameter1, out_parameter2...) IS
BEGIN
END;
BEGIN
open c1;
fetch c1 into c1RowData;
EXIT WHEN c1%NOTFOUND
END;
/
EXIT;
The p1 and p2 operators can throw exceptions (NO_DATA_FOUND, DUP_VAL_ON_INDEX, ...).
What do you think is the best way to handle these exceptions? Should they be processed inside the procedures or do you think that I should surround each procedure call in the main body with the TRY-CATCH block?
bruno source
share