In that case, you could follow the next steps:
- Add a Try Catch activity
- Put your sequence inside the Try block, in case that your sequence fails at any point, TryCatch activity takes you to the Catch block
- Inside yout catch block, add a new type of exception (i.e. System.Exception) to catch any error that the sequence could send, and inside the exception you can add your Take Screenshot sequence, or invoke one
The entire sequence is going to be skipped since the error to the end. And the process is going to continue from Try Catch activity.
In case that you want to continue from the same point that the error was sended, and keeps on the same sequence, I recommend you to use and Global Exception Handler instead of Try Catch activity.