aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/App.hs2
-rw-r--r--src/Text/Pandoc/Error.hs2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs
index e44c6ebfb..b34980c71 100644
--- a/src/Text/Pandoc/App.hs
+++ b/src/Text/Pandoc/App.hs
@@ -451,7 +451,7 @@ convertWithOpts opts = do
Left err' -> liftIO $ do
B.hPutStr stderr err'
B.hPut stderr $ B.pack [10]
- E.throwIO $ PandocAppError 43 "Error producing PDF"
+ E.throwIO $ PandocPDFError (UTF8.toStringLazy err')
| otherwise -> do
let htmlFormat = format `elem`
["html","html4","html5","s5","slidy","slideous","dzslides","revealjs"]
diff --git a/src/Text/Pandoc/Error.hs b/src/Text/Pandoc/Error.hs
index 36e9cca63..b6782036f 100644
--- a/src/Text/Pandoc/Error.hs
+++ b/src/Text/Pandoc/Error.hs
@@ -55,6 +55,7 @@ data PandocError = PandocIOError String IOError
| PandocSyntaxMapError String
| PandocFailOnWarningError
| PandocPDFProgramNotFoundError String
+ | PandocPDFError String
| PandocAppError Int String
deriving (Show, Typeable, Generic)
@@ -86,6 +87,7 @@ handleError (Left e) =
PandocFailOnWarningError -> err 3 "Failing because there were warnings."
PandocPDFProgramNotFoundError pdfprog -> err 47 $
pdfprog ++ " not found. " ++ pdfprog ++ " is needed for pdf output."
+ PandocPDFError log -> err 43 $ "Error producing PDF.\n" ++ log
PandocAppError ec s -> err ec s
err :: Int -> String -> IO a