I have never tried, but have a look at the help of /NERR command.
It seems to have an option to avoid aborting on error.
Another (not tested) idea could be to separate the execution on two different input files: the main one, making the loop, just calls (with /INPUT,,....) the subordinate input file where the solution takes place. If this file fails, it will simply exit without providing results, but the main file (maybe :-) ) will not stop.