Error Handling in Triggers
Go Up to Trigger Exceptions
Errors and exceptions that occur in triggers may be handled using the
WHEN statement. If an exception is handled with
WHEN, the exception does not return a message to the application and does not necessarily terminate the trigger.
Error handling in triggers works the same as for stored procedures: the actions performed in the blocks up to the error-handling (
WHEN) statement are undone and the statements specified by the
WHEN statement are performed.
For more information on error handling with
WHEN, see Working with Stored Procedures.