Trapping user-defined errors should include
- describing situations in which a developer determines a condition is abnormal and needs to be trapped
- analyzing the procedure to explicitly raise an exception
- writing a program that
- declares an Oracle error
- raises an error defined in the declaration section
- includes an EXCEPTION section
- traps the error raised in the EXCEPTION section
- reads the error and provides new instructions to the program that allow the program to resume.