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:
|Posted:||8 years ago|
|Tags:||retry , sleep , recursion , exceptions|