retry 0.7.6.2 → 0.7.6.3
raw patch · 4 files changed
+11/−3 lines, 4 files
Files
- changelog.md +3/−0
- retry.cabal +1/−1
- src/Control/Retry.hs +1/−1
- test/Tests/Control/Retry.hs +6/−1
changelog.md view
@@ -1,3 +1,6 @@+0.7.6.3+* Documentation fix on `recoverAll`+ 0.7.6.2 * Loosen bounds on exceptions again.
retry.cabal view
@@ -14,7 +14,7 @@ case we should hang back for a bit and retry the query instead of simply raising an exception. -version: 0.7.6.2+version: 0.7.6.3 synopsis: Retry combinators for monadic actions that may fail license: BSD3 license-file: LICENSE
src/Control/Retry.hs view
@@ -428,7 +428,7 @@ -- good idea to catch async exceptions as it can result in hanging -- threads and programs. Note that if you just throw an exception to -- this thread that does not descend from SomeException, recoverAll--- will catch it.+-- will not catch it. -- -- See how the action below is run once and retried 5 more times -- before finally failing for good:
test/Tests/Control/Retry.hs view
@@ -88,7 +88,6 @@ f (res :: Either Custom1 ()) @?= Right () - , testCase "fails beyond policy using custom exceptions" $ do f <- mkFailN Custom1 3 res <- try $ recovering@@ -97,6 +96,12 @@ f (res :: Either Custom1 ()) @?= Left Custom1 + , testCase "recoverAll won't catch exceptions which are not decendants of SomeException" $ do+ f <- mkFailN Custom1 4+ res <- try $ recoverAll+ (constantDelay 5000 <> limitRetries 3)+ f+ (res :: Either Custom1 ()) @?= Left Custom1 , testCase "does not recover from unhandled exceptions" $ do f <- mkFailN Custom2 2