stopExecutionOnError
Overview
This utility helps to halt the script execution before it reaches its end when any command fails in between.
Syntax
simlab.stopExecutionOnError();
Use Case
In automated processes, if the subsequent commands depend on the previous command's status, this utility halts the script execution when a command fails.
Sample
Without utility:
With utility:
In the preceding process, the Boolean operation encountered a failure. If the utility is not part of the script file, the execution proceeds through all operations. By using this utility, the script execution stops at the Boolean operation itself.
Note: Sample Script