Share this page

# lr_abort

Aborts the execution of a script.

    void lr_abort( );

Runtime Functions

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."

lr_abort is equivalent to `lr_exit(LR_EXIT_VUSER, LR_ABORT);`. For more options, see lr_exit.

## Return Values

No value is returned.

## Parameterization

Parameterization is not applicable to 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.

Copy code

    int status;
    status = web_url("Login",
              "URL=https://secure.computing.com//login.asp?user=(username)&amp;session={ssid}",
              "RecContentType=text/html", LAST );

    if (status == LR_FAIL) {
            lr_error_message("Error: %s", "Unable to login to secure computing");
            lr_abort();
    }

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