aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-01-21 12:56:52 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-01-21 12:56:52 -0400
commit7f5fc3ec8f2d274c068e5662d04233bc0169c740 (patch)
tree56e5ed6568a04596f377707dc26d1cf42deccfde
parent9bb68caba5cf32009f35945e819fba877ec0f438 (diff)
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.
-rw-r--r--Utility/Process.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Utility/Process.hs b/Utility/Process.hs
index c6699961e..78755f639 100644
--- a/Utility/Process.hs
+++ b/Utility/Process.hs
@@ -133,7 +133,7 @@ forceSuccessProcess p pid = do
code <- waitForProcess pid
case code of
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.
-- Note that using this with createProcessChecked will throw away