Remove withErrorHandler, use liftExceptions instead

This commit is contained in:
Daniel Gröber
2014-08-19 04:28:04 +02:00
parent 0fd8b9afd8
commit 1b5917c70e
7 changed files with 33 additions and 26 deletions

View File

@@ -141,8 +141,12 @@ main = flip E.catches handlers $ do
cmd -> E.throw (NoSuchCommand cmd)
case res of
Right s -> putStr s
Left (GMENoMsg) -> hPutStrLn stderr "Unknown error"
Left (GMEString msg) -> hPutStrLn stderr msg
Left (GMEException e) ->
hPutStrLn stderr $ "Exception: " ++ show e
Left (GMENoMsg) ->
hPutStrLn stderr "Unknown error"
Left (GMEString msg) ->
hPutStrLn stderr msg
Left (GMECabalConfigure msg) ->
hPutStrLn stderr $ "cabal configure failed: " ++ msg
where