Share this page

# lr.setCustomErrorMessage

Sets a custom text to be output after built-in error messages.

Example | Message Functions

## Syntax

    lr.setCustomErrorMessage( message );

Property Name | Description
--- | ---
message | A string containing the error message to send to the Output window.

The lr.setCustomErrorMessage function sets the custom error message to display. The custom error messages are displayed after the built-in error messages.

The message is canceled with lr.removeCustomErrorMessage.

## Return Values

This function returns LR_PASS (0) on success, and LR_FAIL (1) on failure.

## Parameterization

All string input arguments can be passed using standard parameterization.

See Also

## Example

    var mytext = "customized assertion!";
    lr.setCustomErrorMessage("Details: ["+mytext+"], reported at: ["+lr.evalString("{myParameter}")+"]"); ;
    ...
    lr.removeCustomErrorMessage();

Tips to improve your search results... VuGen Function Reference Version 26.1 Function Reference 26.1 All View Local Help Center View Online Help Center Version: