Click here to Skip to main content
15,887,346 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
In Oracle, How do i catch the RAISE_APPLICATION_ERROR in Exception block?
Like exception raised from RAISE_APPLICATION_ERROR always caught in 'WHEN OTHERS THEN' block?

Please answer?

Thanks
Posted
Updated 12-Apr-11 6:51am
v2

Sounds like you are looking for this:
Handling PL/SQL Errors[^]
Overview of PL/SQL Error Handling[^]
 
Share this answer
 
Comments
Wendelius 8-Apr-11 15:27pm    
Essential links, 5'd
The easiest way is to predefine an error number (or numbers) which you would use in the RAISE_APPLICATION_ERROR call. In the EXCEPTION block you can now check if the error number is one of the predefined errors and do proper action. If it's not let it to fall to WHEN OTHERS section.

The error numbers could be predefined for example in a package header.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900