From b4a6c023431fcb313f04afa4c0d222c977c6d27c Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 20 Jan 2012 19:52:56 -0800 Subject: PDF: Better error message. --- src/pandoc.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/pandoc.hs') 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 -- cgit v1.2.3