OnError will install a script that will be executed whenever a command fails. The script is loaded at the moment ITP/Server is started. If an error occurs the current script terminates and ITP/Server transfers control to the script OnError.
If an error occurs and no error handler has been installed, the script will terminate and a runtime error will be reported.
There are two special script names:
OnError
Script(…)
<Key>(…)
<Key>(…)… ;
Script: Required.
The name of the script that will be called whenever an error occurs.
Advised is to use the command ITPError provided by ITP/Server.
<Key>: Optional.
Zero, one or more parameters that will be passed to the script.
The type of these keys is determined by the type of the parameters needed in the script called with the parameter Script(…).