git.iko.soy/typeable/pandoc
on master help sign in
Error: Added PandocPDFError
commit306dc624d982663e07d91bef6d2f84d311b978af authorJohn MacFarlane <jgm@berkeley.edu> dateThu 13 Apr 2017, 17:38 (10 years ago) parentd5701e6
2 files changed+3−1
src/Text/Pandoc/App.hs+1−1 src/Text/Pandoc/Error.hs+2
src/Text/Pandoc/App.hs+1−1
@@ -451,7 +451,7 @@ convertWithOpts opts = do
451451 Left err' -> liftIO $ do
452452 B.hPutStr stderr err'
453453 B.hPut stderr $ B.pack [10]
454− E.throwIO $ PandocAppError 43 "Error producing PDF"
454+ E.throwIO $ PandocPDFError (UTF8.toStringLazy err')
455455 | otherwise -> do
456456 let htmlFormat = format `elem`
457457 ["html","html4","html5","s5","slidy","slideous","dzslides","revealjs"]
src/Text/Pandoc/Error.hs+2
@@ -55,6 +55,7 @@ data PandocError = PandocIOError String IOError
5555 | PandocSyntaxMapError String
5656 | PandocFailOnWarningError
5757 | PandocPDFProgramNotFoundError String
58+ | PandocPDFError String
5859 | PandocAppError Int String
5960 deriving (Show, Typeable, Generic)
6061
@@ -86,6 +87,7 @@ handleError (Left e) =
8687 PandocFailOnWarningError -> err 3 "Failing because there were warnings."
8788 PandocPDFProgramNotFoundError pdfprog -> err 47 $
8889 pdfprog ++ " not found. " ++ pdfprog ++ " is needed for pdf output."
90+ PandocPDFError log -> err 43 $ "Error producing PDF.\n" ++ log
8991 PandocAppError ec s -> err ec s
9092
9193err :: Int -> String -> IO a