diff options
author | Joey Hess <joey@kitenet.net> | 2011-07-05 14:58:33 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-07-05 14:58:33 -0400 |
commit | d31b84c777b6ba7158be8947fc2236b2a15e29bb (patch) | |
tree | 737c18d77f4f627efc7b0db5efa8d579e6026c72 /Messages.hs | |
parent | 82eb082ab9a33713ed1ec3674be2b95f9b81d861 (diff) |
better display of thrown errors
Diffstat (limited to 'Messages.hs')
-rw-r--r-- | Messages.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Messages.hs b/Messages.hs index c44e44eea..038e4c0bc 100644 --- a/Messages.hs +++ b/Messages.hs @@ -43,14 +43,16 @@ showEndOk :: Annex () showEndOk = verbose $ liftIO $ putStrLn "ok" showEndFail :: Annex () -showEndFail = verbose $ liftIO $ putStrLn "\nfailed" +showEndFail = verbose $ liftIO $ putStrLn "failed" showEndResult :: Bool -> Annex () showEndResult True = showEndOk showEndResult False = showEndFail showErr :: (Show a) => a -> Annex () -showErr e = warning $ "git-annex: " ++ show e +showErr e = do + liftIO $ hFlush stdout + liftIO $ hPutStrLn stderr $ "git-annex: " ++ show e warning :: String -> Annex () warning w = do |