Oracle® OLAP DML Reference 11g Release 2 (11.2) E17122-08 |
|
|
PDF · Mobi · ePub |
The ERRORTEXT option holds the text of the first error message that occurs when you execute a program or a statement. The name of the error whose message is found in ERRORTEXT is contained in the ERRORNAME option.
Example 5-35 ERRORTEXT with the SIGNAL Command
In a report program that uses a TRAP command to handle errors, you can use the SIGNAL command to send the appropriate error message to the current outfile.
DEFINE myreport PROGRAM LD Monthly Report PROGRAM TRAP ON CLEANUP NOPRINT PUSH month DECIMALS LSIZE PAGESIZE LIMIT month TO LAST 1 ... POP month DECIMALS LSIZE PAGESIZE RETURN CLEANUP: POP month DECIMALS LSIZE PAGESIZE SIGNAL ERRORNAME ERRORTEXT END