Share this page

# lr.abort

Aborts the execution of a script.

Runtime Functions

## Syntax

    lr.abort( );

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

Not applicable

## Parameterization

Parameterization is not applicable to this function.

## Example

    function Action(){
       var status;

       status = web.url({name : 'Login',
             url:'https://secure.computing.com//login.asp?user=(username)&session={ssid}',
             recContentType:'text/html'});
       if (status == lr.FAIL) {
            lr.errorMessage("Error: Unable to login to secure computing");
            lr.abort();
       }
    return 0;
    }

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: