Customized error message in Oracle PL/SQL based on error code or message

Customized error message in Oracle PL/SQL based on error code or message

 

  

Hi,

Is there any way to give our customized message in PL/SQL in place of oracle
error if any constraint fails.

Suppose if a table have two check constraints and if constraint 1 fails then
I want to give message:

"Check constraint 1 failed"

in place of

"ORA-????? - Check constraint violated"


Please suggest.

Thanks & Regards,
Naveen Kumar

Oracle LazyDBA home page