I think whether you are using a rowcounter in a Do while or Flow Chart loop, or no rowcounter with a ForEach, both methods would involve a Try/Catch.
So, surround the Sequence where the error can occur with a Try/Catch. Then you can store a variable with a string or the exception if desired. For a ForEach, it can just do nothing in the Catch and it will move on to the next row when it loops again. For a Do while, it’s the same except you should be doing rowcounter=rowcounter+1 at the beginning so it will move to the next row. For a Flow Chart loop, you can use that variable you store in the Catch to feed it into a Decision or Switch box so you can restart the loop if there were more tasks to perform, and you should also be doing rowcounter=rowcounter+1 at the start of the loop.
I will also point out that if you need to exit the loop to do things such as close all applications then reenter the loop again (by having the Try/Catch surrounding the entire loop), then using a rowcounter is beneficial in that you can keep track of the current row you are on (technically you can also do a counter in a ForEach also)
Sorry for no visuals. I’m just typing out some suggestions quick.