convert fail to error
Using fail here causes a "user error" exception to be thrown, which implies the user is at fault in its wording, which is incorrect. Also audited for other uses of fail in git-annex; the others are in monadic contexts where fail may not throw an exception, and involve user input, so kept them as-is.
This commit is contained in:
parent
23ff58cd4f
commit
d14770ca9c
1 changed files with 1 additions and 1 deletions
|
@ -133,7 +133,7 @@ forceSuccessProcess p pid = do
|
||||||
code <- waitForProcess pid
|
code <- waitForProcess pid
|
||||||
case code of
|
case code of
|
||||||
ExitSuccess -> return ()
|
ExitSuccess -> return ()
|
||||||
ExitFailure n -> fail $ showCmd p ++ " exited " ++ show n
|
ExitFailure n -> error $ 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