Error Handling Overview
During the Script execution, an error may occur. For example a function fails because the application to launch is specified with an invalid path, or a click on a link within a web page cannot be done because the link does not exist anymore.
This article explains how WinTask handles errors by default and explains how you can handle errors in a custom way.
If an error occurs during the Script execution, an error message is displayed and Script Execution stops. The error message returns the name of the script where the error occurred (file extension is .ROB as it is the executable script, not the source file), the line number for the error and some text explaining the error.
The error message is displayed after a default timeout of 30 seconds. You can change this default value by setting a different value for the system variable #ActionTimeout.
So if a web page loads in more that 30 seconds, the UsePage execution for this page will report an error. Or if the script waits for a window telling when a file download has finished but the file download takes more than 30 seconds, the UseWindow detecting the end of the download will report an error. Change momentarily the value of #ActionTimeout for avoiding a too early execution error.
If OnAction Error structure is used, when an error occurs, the error procedure as defined in OnAction Error is executed. Such an error procedure can take a screenshot of the desktop or of the application window, send a mail, log the error, chain with another script, etc...See OnAction Error article.
When is used for measuring response times or availability, scripts are run very frequently and need to run whatever happened during the previous execution.
Two system variables can be used to make a script execute repeatedly whatever happened during the previous execution. End
See #ExecTimeout article.
See #ScriptAfterTimeout$ article.
The following articles explain how you can resolve typical issues that occur during a script execution.