background image
<< Think Time | Setting Timeouts >>
<< Think Time | Setting Timeouts >>

Handling Exceptions

Baan Vuser Scripts · Creating Baan Vuser Scripts
Creating Vuser Scripts
Chapter 24, page 411
Handling Exceptions
You can instruct a Baan Vuser how to handle exceptions that occur during replay,
such as a message or error windows.
Using the set_exception function, you specify a function to be executed when the
exception is encountered.
In the following example, the set_exception function instructs the Vuser to execute
the
close
function when the Print Sales Invoices window opens. The
close
function
is defined earlier in the script.
int close(char title[])
{
win_close(title);
}
Actions( )
{
set_exception("ttstps0014 : Print Sales Invoices",close);
set_window ("Menu browser [User: bsp ] [812]", 10);
menu_select_item ("File;Run Program...");
set_window ("ttdsk2080m000 : Run Program [812]", 10);
type ("tdsls4101m000");
. . . ;