ErrorClass Macro Expansion

Top  Previous  Next

The following ErrorClass methods allow runtime customization of error message text through expansion of macro symbols:


Names the field that produced the error.


Names the file that produced the error.


Names the file that produced the error, then handles the error.


Modifies error text, then handles the error.

Each error has associated message text. The error message text may contain macro symbols recognized by the ErrorClass object. The ErrorClass object expands these macro symbols to their current runtime values before displaying the message. Supported macros and their runtime substitution values are:


The ErrorClass.FileName property


The ErrorClass.FieldName property


The ErrorClass.MessageText property


Value returned by ERROR()


Value returned by ERRORCODE()


Value returned by FILEERROR()


Value returned by FILEERRORCODE()


%Error(%ErrorCode) or %FileError(%FileErrorCode)


Text from prior defined error with the same id

The %ErrorText macro uses %FileError(%FileErrorCode)--the more specific backend server error information--when it is available, otherwise it uses %Error(%ErrorCode).

This macro expansion capability is a feature of the ErrorClass and is not a feature of the Clarion language in general.


You do not need to specify two percent signs (%%) to display a percent sign (%) in your message text.