use hPrint instead of hPutStrLn

This commit is contained in:
Don Stewart
2007-09-27 21:39:01 +00:00
parent 019315e70c
commit 5e943d512c

View File

@@ -166,7 +166,7 @@ io = liftIO
-- | Lift an IO action into the X monad. If the action results in an IO
-- exception, log the exception to stderr and continue normal execution.
catchIO :: IO () -> X ()
catchIO f = liftIO (f `catch` \e -> do hPutStrLn stderr (show e); hFlush stderr)
catchIO f = liftIO (f `catch` \e -> hPrint stderr e >> hFlush stderr)
-- | spawn. Launch an external application
spawn :: String -> X ()