use
exception
raise_application_error
end;

at the end of the trigger.