Revert "convert fail to error"

This reverts commit d14770ca9c.

That changed the type of error from an IOError to something else, so broke
stuff that was catching IOErrors.

So back to a UserError, but be explicit this time that's what it's
throwing.
This commit is contained in:
Joey Hess 2016-01-24 13:59:40 -04:00
parent 8c3d302532
commit 9737c9a362
Failed to extract signature

View file

@ -133,7 +133,8 @@ forceSuccessProcess p pid = do
code <- waitForProcess pid
case code of
ExitSuccess -> return ()
ExitFailure n -> error $ showCmd p ++ " exited " ++ show n
ExitFailure n -> ioError $ userError $
showCmd p ++ " exited " ++ show n
-- | Waits for a ProcessHandle and returns True if it exited successfully.
-- Note that using this with createProcessChecked will throw away