|Oracle® OLAP DML Reference
10g Release 1 (10.1)
Part Number B10339-02
The text of the error whose name is contained in ERRORNAME is contained in the option ERRORTEXT.
The ERRNAMES option controls whether the value of the ERRORTEXT option contains the name of the error (that is, the value of the ERRORNAME option) as well as the text of the error message.
You can use the special name
PRGERR 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.
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
Example 11-30 Using ERRORNAME with TRAP
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