Share this page

# Example: lr.abort

In the following example, lr.abort aborts the script if it cannot open a file.

    try {
         File file = new File("c:/temp/Java" + Thread.currentThread() + ".txt");
         FileOutputStream fos = new FileOutputStream(file.getName());
         outstr = new PrintStream(fos);
       }

    catch (IOException e) {
         outstr = null;
         outstr.println("Init (vuser " + lr.get_vuser_id() + ")");
        lr.abort( );
       };

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