diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2012-01-20 19:52:56 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2012-01-20 19:52:56 -0800 |
commit | b4a6c023431fcb313f04afa4c0d222c977c6d27c (patch) | |
tree | ed5fde68d6af943a904ea257f85706f989650c39 /src/pandoc.hs | |
parent | ce3653e39d3e3a57748c4922189eb9610d568051 (diff) | |
download | pandoc-b4a6c023431fcb313f04afa4c0d222c977c6d27c.tar.gz |
PDF: Better error message.
Diffstat (limited to 'src/pandoc.hs')
-rw-r--r-- | src/pandoc.hs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/pandoc.hs b/src/pandoc.hs index 0eae9cdc2..506ed703d 100644 --- a/src/pandoc.hs +++ b/src/pandoc.hs @@ -975,10 +975,9 @@ main = do do res <- tex2pdf PDFLaTeX $ writeLaTeX writerOptions doc2 case res of Right pdf -> writeBinary pdf - Left err' -> B.hPutStr stderr err' >> B.hPutStr stderr nl + Left err' -> B.hPutStr stderr err' | otherwise -> error $ "Unknown writer: " ++ writerName' where writeBinary = B.writeFile (encodeString outputFile) - nl = B.singleton 10 Just r -> writerFn outputFile =<< postProcess result where writerFn "-" = UTF8.putStr writerFn f = UTF8.writeFile f |