aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-09-12 08:40:32 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2019-09-12 08:46:38 -0700
commit4f909c626c4fe211d38a93c4db9ed70ab60dbb72 (patch)
tree100933824450511a8280ce072ad0208a4729b1f1 /src/Text/Pandoc
parent5aef7d04f03ff3abbe621f0a4364ecef06145c9b (diff)
downloadpandoc-4f909c626c4fe211d38a93c4db9ed70ab60dbb72.tar.gz
Change exit codes.
It's good practice not to use codes 1-2 for user errors. Also, we used 65 for two different errors. - PandocAppError was 1, is now 4 - PandocOptionError was 2, is now 6 - PandocMakePDFError was 65, is now 66
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Error.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Error.hs b/src/Text/Pandoc/Error.hs
index afb18a2f6..2d87fed33 100644
--- a/src/Text/Pandoc/Error.hs
+++ b/src/Text/Pandoc/Error.hs
@@ -85,8 +85,8 @@ handleError (Left e) =
if sourceName errPos == "source"
then errorInFile
else ""
- PandocMakePDFError s -> err 65 s
- PandocOptionError s -> err 2 s
+ PandocMakePDFError s -> err 66 s
+ PandocOptionError s -> err 6 s
PandocSyntaxMapError s -> err 67 s
PandocFailOnWarningError -> err 3 "Failing because there were warnings."
PandocPDFProgramNotFoundError pdfprog -> err 47 $
@@ -99,7 +99,7 @@ handleError (Left e) =
PandocResourceNotFound fn -> err 99 $
"File " ++ fn ++ " not found in resource path"
PandocTemplateError s -> err 5 $ "Error compiling template " ++ s
- PandocAppError s -> err 1 s
+ PandocAppError s -> err 4 s
PandocEpubSubdirectoryError s -> err 31 $
"EPUB subdirectory name '" ++ s ++ "' contains illegal characters"
PandocMacroLoop s -> err 91 $