better display of thrown errors
This commit is contained in:
parent
82eb082ab9
commit
d31b84c777
4 changed files with 15 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue