My company has a coding standard that basically requires error handling for object cloning, but I am not really sure how to implement the Error Handling command to account for every single object cloning instance. Here is my current setup:The Error Handling command only has options to "continue" or "stop task".. if I select Continue but the object clone fails, the bot fails entirely so I don't see how Error Handling will help. If I choose Stop Task, I don't really want it to Stop.. I want it to close everything and restart from line 1.
All of the object cloning commands are inside of a loop. Am I supposed to make each object clone a sub task and write "if task fails then .." ? that seems incredibly inefficient and possibly cause more issues than leaving it as is.
Hi @Phillip Graves ,
Below are the steps that will help you to achieve restarting of the application incase if an error:
Please let me know if this answers your question.
If I understand correctly, the Parent task is basically a shell, and all the object cloning and other code could be its own subtask. So instead of breaking up the code starting at the object cloning.. couldn't I just make a new task that has the steps listed under "2", and just do a "run task" that includes all the other code I've already written + new error handling?
Yes, please make sure that all the object cloning commands are under the Error Handling as show in the screenshot.
FYI - When an error occurs in the error handling, There are two system variable which will precisely tell in what line number the error occurred along with error description.
System Variables are - Error Line Number and Error Description