lr_remove_custom_error_message
Removes a custom text that was set by lr_set_custom_error_message.
int lr_remove_custom_error_message.htm( ); | Alphabetical Listing - C Language Utility Functions |
The lr_remove_custom_error_message.htm function removes a text that was set by lr_set_custom_error_message.
Return Values
This function returns LR_PASS (0) on success, and LR_FAIL (1) on failure.
Parameterization
You cannot use standard parameterization for any arguments in this function.
Example
In the following example, lr_set_custom_error_message sets a custom message and lr_remove_custom_error_message cancels it:
char * mytext = "customized assertion!";
lr_set_custom_error_message("Details: [%s], reported at: [%s]",mytext,lr_eval_string("{myParameter}"));
lr_error_message("error message");
lr_think_time(3);
web_url("web_step","URL=http://myserver/notfound","Resource=0",LAST);
lr_think_time(3);
web_reg_find("Text=Some text",LAST);
web_url("to check","URL=http://myserver/index.html",LAST);
lr_remove_custom_error_message();
lr_error_message("error message without customization");Example: Output:
Starting action Action.
Action.c(7): Error: error message
Details: [customized assertion !], reported at: [18]
Action.c(11): web_url("web_step") started [MsgId: MMSG-26355]
Action.c(11): Error -26627: HTTP Status-Code=404 (Not Found) for "http://myserver/notfound" [MsgId: MERR-26627]
Details: [customized assertion !], reported at: [18]
Action.c(11): web_url("web_step") highest severity level was "ERROR", 1635 body bytes, 160 header bytes [MsgId: MMSG-26388]
Ending action Action.

