|
How to execute commands when an error occurs
|
|
| Add this line to [Settings]:
|
| a) Click file / new section / onerror to create an empty [OnError] section.
|
|
|
| b) Fill the section with this code:
|
| Run it twice to make sure that an error occurs - when the directories exists.
|
|
|
| Notice that the error dialog is not displayed anymore.
|
| a) Open the event viewer and check the application log:
|
|
|
|
|
|
| b) Open explorer and go to c:\
|
|
|
|
|
|
| A copy of the script has been saved as c:\Err_2002-08-25.cnu with all markers intact. This setup is very useful when a script is called automatically from the schedule service - when an error occurs it is possible to open the script that failed and retry it from where it stopped in GUI.
|
|
|
| Learn more in the topic error handling in the SetupBatcher manual.
|