Syntax
The Raise Error statement has the following format:
RAISE ERROR errornumber [errortext]
[WITH DESTINATION = ([SESSION] [, ERROR_LOG] [, AUDIT_LOG])];
errornumber
Can be an integer constant, a local variable, or a parameter in the invoked database procedure. If it is a local variable, it must be either a non-nullable integer or smallint type.
errortext
Is an optional text string that describes the error associated with errornumber. It can be a string constant, a local string variable, or a parameter in the invoked database procedure. If errortext is not specified, interactive applications such as QBF display a default error message.
Limits: The maximum length is 1500 bytes.