Quantcast
Channel: Silk Performer
Viewing all articles
Browse latest Browse all 4084

Forum Post: RE: use of functions

$
0
0
Hi Arwin, The return statement would terminate the execution of a transaction or the simulation of the user executing the current transaction. For example, if you need to terminate the execution after a certain call, you can include a return statement. The return statement and error handling actually tie in. Error handling in Silk Performer basically provides certain functionality to apply if certain situations occur,GetLastError, GetErrorCode. Take the following example: dclevent    handler Handler1 EVENT_RAISE_ERROR    var      tname: string;  begin       if GetErrorCode(GetLastError()) = 29 then        return;    end;    end Handler1;   If an error is returned during test execution which consists of the error code "29", the transaction which the virtual user is currently executing is terminated thanks to the return statement. Regards Paul

Viewing all articles
Browse latest Browse all 4084

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>