factor out Annex exception handling module

This commit is contained in:
Joey Hess 2011-10-04 00:34:04 -04:00
parent 1a96d4ab35
commit ff21fd4a65
3 changed files with 34 additions and 14 deletions

View file

@ -7,10 +7,8 @@
module Command.Add where
import Control.Exception.Control (handle)
import Control.Exception.Base (throwIO)
import AnnexCommon
import Annex.Exception
import Command
import qualified Annex
import qualified AnnexQueue
@ -58,7 +56,7 @@ undo file key e = do
logStatus key InfoMissing
rethrow
where
rethrow = liftIO $ throwIO e
rethrow = throw e
-- fromAnnex could fail if the file ownership is weird
tryharder :: IOException -> Annex ()