IO exception rework
ghc 7.4 comaplains about use of System.IO.Error to catch exceptions. Ok, use Control.Exception, with variants specialized to only catch IO exceptions.
This commit is contained in:
parent
05f89123e0
commit
146c36ca54
14 changed files with 56 additions and 44 deletions
|
@ -11,7 +11,6 @@ module CmdLine (
|
|||
shutdown
|
||||
) where
|
||||
|
||||
import qualified System.IO.Error as IO
|
||||
import qualified Control.Exception as E
|
||||
import Control.Exception (throw)
|
||||
import System.Console.GetOpt
|
||||
|
@ -74,7 +73,7 @@ tryRun' errnum _ cmd []
|
|||
| otherwise = return ()
|
||||
tryRun' errnum state cmd (a:as) = run >>= handle
|
||||
where
|
||||
run = IO.try $ Annex.run state $ do
|
||||
run = tryIO $ Annex.run state $ do
|
||||
Annex.Queue.flushWhenFull
|
||||
a
|
||||
handle (Left err) = showerr err >> cont False state
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue