Oracle® OLAP DML Reference 10g Release 2 (10.2) Part Number B14346-01 |
|
|
View PDF |
The ERRORNAME option holds the name of the first error that occurs when you execute a program or when you execute an OLAP DML statement.
Data type
TEXT
Syntax
ERRORNAME
Notes
ERRORNAME and SIGNAL
You can create your own error conditions in a program with the SIGNAL command. SIGNAL sets ERRORNAME and ERRORTEXT to the values you specify.
You can use the special name PRGERR
with the SIGNAL command to communicate to a calling program that an error has occurred. The command SIGNAL PRGERR
sets ERRORNAME to a blank value and passes an error condition to the calling program without causing another error message to be displayed. For information on using SIGNAL to pass an Oracle OLAP error up a chain of nested programs, see the TRAP command.
Oracle OLAP Error Messages
The analytic workspace has a list of Oracle OLAP error messages with their associated names. The messages are contained in the variable _MSGTEXT
, which is dimensioned by _MSGID
. To produce this list, execute the following statement.
REPORT WIDTH 60 _MSGTEXT
Examples
Example 11-30 Using ERRORNAME with TRAP
In a report program that uses a TRAP command to handle errors, you can use the SIGNAL command to send the appropriate error name 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