@aronax said in What to do when an unexpected error occurs in a script?:
Except "Ignore Errors" action, is there any other way of handling a random error in a script?
I'm referring to those errors that appear at random steps in the script and they are rare or hard to anticipate. Or when the script has to make tens of clicks on various elements on multiple pages, and setting an "Ignore Errors" action for each of them is too complicated. I'd like to know if there is a general action that can be set to do something when such a random/ unexpected error appears in a script (like if at some point the script cannot find an element, then it should save this error in an xlsx file).
Thank you
Put all actions in a function, and wrap its call in ignoring errors. Any error in the function will trigger error ignoring.
