How's about:

* count the # of failures.
* raise an exception if the the failure count reaches a threshold.