summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/PDF.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-03-19 11:09:36 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-03-19 11:09:36 -0700
commit3df75bc160827fbd0322ecf48e543977cda0156f (patch)
treec1a0a417011c6a82a863b7ef63896a2e0896b85e /src/Text/Pandoc/PDF.hs
parent575cc7eddcb903ca2edd4210be9b388c4c5af2e1 (diff)
PDF: Changes to error reporting, to handle non-UTF8 error output.
Diffstat (limited to 'src/Text/Pandoc/PDF.hs')
-rw-r--r--src/Text/Pandoc/PDF.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Text/Pandoc/PDF.hs b/src/Text/Pandoc/PDF.hs
index a5f1597bd..608cad2e9 100644
--- a/src/Text/Pandoc/PDF.hs
+++ b/src/Text/Pandoc/PDF.hs
@@ -116,7 +116,6 @@ tex2pdf' tmpDir program source = do
then 3 -- to get page numbers
else 2 -- 1 run won't give you PDF bookmarks
(exit, log', mbPdf) <- runTeXProgram program numruns tmpDir source
- let msg = "Error producing PDF from TeX source.\n"
case (exit, mbPdf) of
(ExitFailure _, _) -> do
let logmsg = extractMsg log'
@@ -125,8 +124,8 @@ tex2pdf' tmpDir program source = do
x | "! Package inputenc Error" `BC.isPrefixOf` x ->
"\nTry running pandoc with --latex-engine=xelatex."
_ -> ""
- return $ Left $ msg <> logmsg <> extramsg
- (ExitSuccess, Nothing) -> return $ Left msg
+ return $ Left $ logmsg <> extramsg
+ (ExitSuccess, Nothing) -> return $ Left ""
(ExitSuccess, Just pdf) -> return $ Right pdf
(<>) :: ByteString -> ByteString -> ByteString