Skip Headers

Oracle® OLAP DML Reference
10g Release 1 (10.1)

Part Number B10339-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

ERRORNAME

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 TRAP

ERRORNAME is often used in programs in conjunction with the TRAP command for handling errors. See Example 11-30, "Using ERRORNAME with TRAP".


ERRORTEXT Option

The text of the error whose name is contained in ERRORNAME is contained in the option ERRORTEXT.


ERRNAMES Option

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.


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.


SIGNAL PRGERR

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.


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