2 people like it.
Like the snippet!
Less-nonsense 8-line retry function that will retry a function a specified up to `maxRetries` times while it throws. After the retries, any remaining exception is allowed to propagate. Accepts a before function to allow you to wait/report when a retry is taking place
1: 2: 3: 4: 5: 6: 7: 8: |
|
Link: | http://fssnip.net/o0 |
Posted: | 10 years ago |
Author: | Ruben Bartelink |
Tags: | retry , sleep , recursion , exceptions |