diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-04-15 13:46:46 +0200 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-04-15 13:46:46 +0200 |
commit | 629c6494a599a6a2923798e8a83c7f5ab8de086e (patch) | |
tree | 1144420b30ff5003832252dc50a3635b73809fb1 /src | |
parent | bcc848d773f9b0f968e7ecb69739adea0432045e (diff) |
Small fix to error reporting in App.
Closes #3548.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/App.hs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs index 4b14a9d73..c38ebdd84 100644 --- a/src/Text/Pandoc/App.hs +++ b/src/Text/Pandoc/App.hs @@ -64,7 +64,7 @@ import System.Directory (Permissions (..), doesFileExist, findExecutable, import System.Environment (getArgs, getEnvironment, getProgName) import System.Exit (ExitCode (..), exitSuccess) import System.FilePath -import System.IO (stderr, stdout) +import System.IO (stdout) import System.IO.Error (isDoesNotExistError) import Text.Pandoc import Text.Pandoc.Builder (setMeta) @@ -448,9 +448,7 @@ convertWithOpts opts = do res <- makePDF pdfprog f writerOptions verbosity media doc' case res of Right pdf -> writeFnBinary outputFile pdf - Left err' -> liftIO $ do - B.hPutStr stderr err' - B.hPut stderr $ B.pack [10] + Left err' -> liftIO $ E.throwIO $ PandocPDFError (UTF8.toStringLazy err') | otherwise -> do let htmlFormat = format `elem` |