JavaScript Functions > Alphabetical Listing of Utility Functions (lr) > lr.setCustomErrorMessage

lr.setCustomErrorMessage

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

ExampleMessage Functions

Syntax

lr.setCustomErrorMessage( message ); 
Property Name
Description
messageA 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.

Concept Link IconSee Also

Example

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