Before raising a user-defined exception, you must first declare the exception.
The syntax is
<exception_name> exception;
When you raise the exception, you do it by using the RAISE command.
The syntax is:
raise <exception_name>;
Handle your exception just as if it were a named predefined exception. The syntax is:
when <exception_name> then