@@ -181,7 +181,7 @@ convertWithOpts opts = do
181181 "\nTo create a pdf using pandoc, use " ++
182182 "-t latex|beamer|context|ms|html5" ++
183183 "\nand specify an output file with " ++
184− ".pdf extension (-o filename.pdf)." ++
184+ ".pdf extension (-o filename.pdf)."
185185 else e
186186 Right w -> return (w :: Writer PandocIO)
187187
@@ -304,7 +304,7 @@ convertWithOpts opts = do
304304 let addSyntaxMap existingmap f = do
305305 res <- parseSyntaxDefinition f
306306 case res of
307− Left errstr -> E.throwIO $ PandocAppError 67 errstr
307+ Left errstr -> E.throwIO $ PandocSyntaxMapError errstr
308308 Right syn -> return $ addSyntaxDefinition syn existingmap
309309
310310 syntaxMap <- foldM addSyntaxMap defaultSyntaxMap
@@ -312,7 +312,7 @@ convertWithOpts opts = do
312312
313313 case missingIncludes (M.elems syntaxMap) of
314314 [] -> return ()
315− xs -> E.throwIO $ PandocAppError 73 $
315+ xs -> E.throwIO $ PandocSyntaxMapError $
316316 "Missing syntax definitions:\n" ++
317317 unlines (map
318318 (\(syn,dep) -> (T.unpack syn ++ " requires " ++
@@ -388,8 +388,7 @@ convertWithOpts opts = do
388388 Just logfile -> B.writeFile logfile (encodeLogMessages reports)
389389 let isWarning msg = messageVerbosity msg == WARNING
390390 when (optFailIfWarnings opts && any isWarning reports) $
391− E.throwIO $
392− PandocAppError 3 "Failing because there were warnings."
391+ E.throwIO PandocFailOnWarningError
393392 return res
394393
395394 let sourceToDoc :: [FilePath] -> PandocIO (Pandoc, MediaBag)
@@ -443,10 +442,8 @@ convertWithOpts opts = do
443442 | otherwise -> optLaTeXEngine opts
444443 -- check for pdf creating program
445444 mbPdfProg <- liftIO $ findExecutable pdfprog
446− when (isNothing mbPdfProg) $
447− liftIO $ E.throwIO $ PandocAppError 41 $
448− pdfprog ++ " not found. " ++
449− pdfprog ++ " is needed for pdf output."
445+ when (isNothing mbPdfProg) $ liftIO $ E.throwIO $
446+ PandocPDFProgramNotFoundError pdfprog
450447
451448 res <- makePDF pdfprog f writerOptions verbosity media doc'
452449 case res of