LassoScript Utility
Basics Browse Detail

[Error_SetErrorMessage]

Tag Link [Error_SetErrorMessage] Category Error
Type Process Source Available No
Support Preferred Version 3.0
Change Unchanged Data Source Any
Output Type None Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0, Lasso 3.x

Description

[Error_SetErrorMessage] sets the current error message to specified value. This tag can be used to report a custom error message or can be used with any of the [Error_...] tags to report a standard error.

Note: Set error messages can only be accessed below the point at which they are set in a format file. They will not propagate out of custom tags, included files or libraries.

Note: If the error message is set to the empty string then Lasso will automatically look up the corresponding error message for the current error code. The preferred method of resetting the error message is to set it to the empty string '' (rather than to [No_Error]).

Syntax

[Error_SetErrorMessage: 'Error Message']

Parameters

Required Parameters
Error Message The error message which will be reported by subsequent calls to [Error_CurrentError]

Examples

To report a standard error:

Use the [Error_SetErrorMessage] and [Error_SetErrorCode] tags with any of the [Error_...] tags that report standard error messages and codes. The following example sets an error as if the current user did not have permission to perform an action.

[Error_SetErrorMessage: (Error_NoPermission)]
[Error_SetErrorCode: (Error_NoPermission: -ErrorCode)]