976798 wrote:In general you will know, what type of error occur in your code. If you can't define, you can write custom (you own) exception, thats will help you where the problem occurred.
I know how to do this in pl/sql traditionally .For this firstly i have to write a conditional statement on which a specified exception is occurred.
e exception ;
if -- conditional statement for which i have to raise exception when found then raise it.
to do this i have to sure that what type of exception is possible.But in that case in which we dont make possibilities then how to handle these type of exceptions
Hope this helps...
.....your code raise_application_error(-20000,'Failed to send mail due to Approve band data not found. ' || sqlerrm);
For a case in which you have no knowledge about upcoming error and raising conditional statement then how to handle errors.The best way is to not handle them at all, but let them raise. So you get at least as much information as possible.
Suppose there may occur few exceptions(more than 1) in code and you have to handle those then it is necessary to raise and handle exception at each item level validation.What exactly is the question?