factored out some useful error catching methods

This commit is contained in:
Joey Hess 2011-11-10 20:24:24 -04:00
parent a71c03bc51
commit 49d2177d51
15 changed files with 54 additions and 61 deletions

2
Git.hs
View file

@ -414,7 +414,7 @@ pipeNullSplitB params repo = filter (not . L.null) . L.split '\0' <$>
reap :: IO ()
reap = do
-- throws an exception when there are no child processes
r <- catch (getAnyProcessStatus False True) (\_ -> return Nothing)
r <- catchDefaultIO (getAnyProcessStatus False True) Nothing
maybe (return ()) (const reap) r
{- Forces git to use the specified index file.