background image
<< Handling Errors | Modifying Error Handling Locally >>
<< Handling Errors | Modifying Error Handling Locally >>

Modifying Error Handling Globally

Database Vuser Scripts · Developing Database Vuser Scripts
Creating Vuser Scripts
Chapter 9, page 157
Modifying Error Handling Globally
You can change the way that LoadRunner handles errors by issuing an
LRD_ON_ERROR_CONTINUE or LRD_ON_ERROR_EXIT statement. By default,
LoadRunner aborts the script execution upon any type of error--database,
parameter related, etc. To change the default behavior, insert the following line into
your script:
From this point on, LoadRunner continues script execution, even when an error
occurs.
You can also specify that LoadRunner continues script execution when an error
occurs only within a segment of the script. For example, the following code tells
LoadRunner to continue script execution even if an error occurs in the lrd_stmt or
lrd_exec functions:
Use the LRD_ON_ERROR_CONTINUE statement with caution, as significant and
severe errors may be missed.
LRD_ON_ERROR_CONTINUE;
LRD_ON_ERROR_CONTINUE;
lrd_stmt(Csr1, "select..."...);
lrd_exec(...);
LRD_ON_ERROR_EXIT;