From d14770ca9c3d01755cd11f2c034f99c3a823f1d8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 21 Jan 2016 12:56:52 -0400 Subject: [PATCH] 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. --- Utility/Process.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utility/Process.hs b/Utility/Process.hs index c6699961ef..78755f6397 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