During execution of SQL statements within a stored procedure, conditions are raised when the SQL statements complete execution or result in an error or warning.
You can also explicitly raise an exception condition, a completion condition (other than successful condition), or a user-defined condition using the SIGNAL statement.
You can use the RESIGNAL statement to resignal or invoke a condition from a handler declaration. You can explicitly specify the RESIGNAL statement only in a handler declaration. RESIGNAL always propagates the condition outward. When a RESIGNAL statement is submitted from a handler action, the outer containing compound statements are searched to find the appropriate handler to handle the condition raised by the RESIGNAL statement.