summaryrefslogtreecommitdiff
path: root/pandoc.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 /pandoc.hs
parent575cc7eddcb903ca2edd4210be9b388c4c5af2e1 (diff)
PDF: Changes to error reporting, to handle non-UTF8 error output.
Diffstat (limited to 'pandoc.hs')
-rw-r--r--pandoc.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/pandoc.hs b/pandoc.hs
index 709b5a777..4a4e53bdd 100644
--- a/pandoc.hs
+++ b/pandoc.hs
@@ -1172,7 +1172,10 @@ main = do
res <- makePDF latexEngine f writerOptions doc2
case res of
Right pdf -> writeBinary pdf
- Left err' -> err 43 $ UTF8.toStringLazy err'
+ Left err' -> do
+ B.hPutStr stderr $ err'
+ B.hPut stderr $ B.pack [10]
+ err 43 "Error producing PDF from TeX source"
| otherwise -> selfcontain (f writerOptions doc2 ++
['\n' | not standalone'])
>>= writerFn outputFile . handleEntities