The RESIGNAL statement is used to return an exception from a handler.

RESIGNAL SQLSTATE <sql-state> [SET <message_text> = <expression>]
sql_state
specifies the five-character SQLSTATE code. For example, HY000.
message_text
(optional) specifies the message to text to be returned when the exception is thrown.
expression
(optional) is an expression that when met returns the message text.
Note: The message text is provided by the SQLSTATE unless the expression of the SET command is met.