You can throw user-defined error messages from PL/SQL code. Error codes between -20000 until -20999 are reserved for user specified error messages. You do so by calling the raise_application_error function within your PL/SQL: raise_application_error(-20001, ‘Your error code message here’); This will be propagated just like normal Oracle errors.
raise_application_error
Edit page
Share this post on: