Share this page

# Example: lr.error_message

In the this example, there is a parameter, <iteration> that reports the iteration number of the test. The lr.error_message function sends a message indicating the current iteration number.

      public int login(string username, string password)
           {
            //emulate failed login
            return lr.FAIL;
            }
      int status = login("username","password");

      if (status == lr.FAIL) {

    	lr.error_message( "Error at iteration #" + lr.eval_string( "{iteration}" ) );
    	return -1;
    	}
    return 0;

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: