![]() Previous |
![]() Next |
All errors that occur when a statement or statement sequence does not conform to its requirements are signaled automatically. In your program, you can establish additional requirements for your own application. When a requirement is not met, you can execute a SIGNAL
statement to signal an error.
You can give the error any name. When a SIGNAL
statement is executed, the error name you specify is stored in the ERRORNAME
option, just as an OLAP DML error name is automatically stored. When you specify your own error message in a SIGNAL
statement, then your message is produced just as an OLAP DML error message is produced. When you are using a TRAP
statement to trap errors, a SIGNAL
statement branches to the TRAP
label after the error message is produced.
For an example of signaling an error, see Example: Signaling an Error.
When you want to produce a warning message without branching to an error label, then you can use a SHOW
statement as illustrated in Example: Creating Error Messages Using SHOW.