Share this page

# lr.abort

Aborts the execution of a script.

## JavaScript

    function lr.abort()

## VBScript

    Sub lr.abort()

Runtime Functions

## Arguments

Name | Comments
--- | ---
N/A |

The lr.abort function aborts the execution of a script . It stops the execution of the Actions section, executes the vuser_end section, and ends the execution. This function is useful when you need to manually abort a run as a result of a specific error condition. When you end a run using this function, the status is "Stopped."

## Return Values

No value returned.

## Parameterization

Standard parameterization is not available for this function.

## Example

In the following example, lr.error_message sends a message to the output window or log file if the login fails. lr.abort is then invoked to abort the script.

    status = myLogon("Logon",
              "URL=https://secure.computing.com//login.asp?user=(username)&session={ssid}");

    if (status == LR_FAIL) {
         lr.error_message("Error: "Unable to login to secure computing");
          lr.abort();
    }

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: