aboutsummaryrefslogtreecommitdiff
path: root/Annex/NumCopies.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-06-20 10:31:47 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-06-20 10:31:47 -0400
commitf8fbc9f5ecd4ff4b065419bebeb996b09d88dfc2 (patch)
treebd206ece8cdd3f3601914799f5a43500ddc0ccd3 /Annex/NumCopies.hs
parent94c8cb5996d10be3dab72c18d53f222a1ec4093c (diff)
handle SomeAsyncException same as AsyncException
This new class was added to base a while ago; I don't know what uses it, but it's intended to be an async exception, so make sure we don't catch it.
Diffstat (limited to 'Annex/NumCopies.hs')
-rw-r--r--Annex/NumCopies.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Annex/NumCopies.hs b/Annex/NumCopies.hs
index 8653e495a..5e818fe95 100644
--- a/Annex/NumCopies.hs
+++ b/Annex/NumCopies.hs
@@ -5,7 +5,7 @@
- Licensed under the GNU GPL version 3 or higher.
-}
-{-# LANGUAGE ScopedTypeVariables, DeriveDataTypeable #-}
+{-# LANGUAGE CPP, ScopedTypeVariables, DeriveDataTypeable #-}
module Annex.NumCopies (
module Types.NumCopies,
@@ -163,6 +163,9 @@ verifyEnoughCopiesToDrop nolocmsg key removallock need skip preverified tocheck
cont v `catchNonAsync` (throw . DropException)
a `M.catches`
[ M.Handler (\ (e :: AsyncException) -> throwM e)
+#if MIN_VERSION_base(4,7,0)
+ , M.Handler (\ (e :: SomeAsyncException) -> throwM e)
+#endif
, M.Handler (\ (DropException e') -> throwM e')
, M.Handler (\ (_e :: SomeException) -> fallback)
]