I am having a script(myscript), that throws an error whenever there is any part of hardware missing, which is defined in different ways to be used inside of the script.
What I want to do is that whenever any error (maybe even some different error, that I may have not encountered before), whenever "any kind of error" occurs, the script shall retry running for one more time. What would be the best way to do this.
Is try catch the only option, and if yes please edify for how can I use it for 'myscript' to be executed one more time, when the error happens.
Thanks in advance