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:
parent
8c3d302532
commit
9737c9a362
1 changed files with 2 additions and 1 deletions
|
@ -133,7 +133,8 @@ forceSuccessProcess p pid = do
|
||||||
code <- waitForProcess pid
|
code <- waitForProcess pid
|
||||||
case code of
|
case code of
|
||||||
ExitSuccess -> return ()
|
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.
|
-- | Waits for a ProcessHandle and returns True if it exited successfully.
|
||||||
-- Note that using this with createProcessChecked will throw away
|
-- Note that using this with createProcessChecked will throw away
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue