diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2009-12-07 08:26:27 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2009-12-07 08:26:27 +0000 |
commit | 56ca3e8dcf955e0685b42cdae8f3c86cca161d51 (patch) | |
tree | e25792cc34e2a054327d98a97ee949244951904c /src/markdown2pdf.hs | |
parent | 2a6803c7b6e9ced4c69490c4d6d0e9100623aa7e (diff) |
Changed markdown2pdf.hs so it prints error messages on last attempt.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1654 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/markdown2pdf.hs')
-rw-r--r-- | src/markdown2pdf.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/markdown2pdf.hs b/src/markdown2pdf.hs index 79cd09a2d..7bcbf4a82 100644 --- a/src/markdown2pdf.hs +++ b/src/markdown2pdf.hs @@ -64,12 +64,12 @@ runLatexRaw file = do runLatex :: FilePath -> IO (Either String FilePath) runLatex file = step 3 where - step 0 = return $ Left "Limit of attempts reached" step n = do result <- runLatexRaw file case result of Left (Left err) -> return $ Left err - Left (Right _ ) -> step (n-1 :: Int) + Left (Right _) | n > 1 -> step (n-1 :: Int) + Left (Right msg) -> return $ Left msg Right pdfFile -> return $ Right pdfFile checkLatex :: String -> (Bool, Bool, Bool, String) |