Command
The @@ERROR command forces the macro processor to stop and report an error.
Syntax
@@ERROR( lineNumber , errorCode )
lineNumber | A number representing a line in the calculation script or formula where the macro is used. |
errorCode | An error code for the error |
Notes
The @@Lx command can be used as the first parameter of an @@ERROR statement to identify a line number in a calculation script or formula where the macro is used.
Example
The following example function checks the first input argument for valid values (SKIPNONE, SKIPMISSING, SKIPZERO, SKIPBOTH). If none of these values is found, the macro returns an error, specifying a line number in a calculation script or formula where the macro is used.
@@IFSTRCMP (@@1, SKIPNONE) @_JAVGS (0, @@2) @@ELSE @@IFSTRCMP (@@1, SKIPMISSING) @_JAVGS (1, @@2) @@ELSE @@IFSTRCMP (@@1, SKIPZERO) @_JAVGS (2, @@2) @@ELSE @@IFSTRCMP (@@1, SKIPBOTH) @_JAVGS (3, @@2) @@ELSE @@ERROR (@@L1, @_INVALIDSKIP) @@ENDIF @@ENDIF @@ENDIF @@ENDIFP>
See Also
Copyright 1991-2002 Hyperion Solutions Corporation. All rights reserved.