git.iko.soy/typeable/pandoc
on master help sign in
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

commit4f909c626c4fe211d38a93c4db9ed70ab60dbb72 authorJohn MacFarlane <jgm@berkeley.edu> dateThu 12 Sep 2019, 08:40 (7 years ago) parent5aef7d0
2 files changed+6−6
MANUAL.txt+3−3 src/Text/Pandoc/Error.hs+3−3
MANUAL.txt+3−3
@@ -1382,10 +1382,10 @@ Exit codes
13821382If pandoc completes successfully, it will return exit code 0.
13831383Nonzero exit codes have the following meanings:
13841384
1385− 1 PandocAppError
1386− 2 PandocOptionError
13871385 3 PandocFailOnWarningError
1386+ 4 PandocAppError
13881387 5 PandocTemplateError
1388+ 6 PandocOptionError
13891389 31 PandocEpubSubdirectoryError
13901390 43 PandocPDFError
13911391 47 PandocPDFProgramNotFoundError
@@ -1394,7 +1394,7 @@ Nonzero exit codes have the following meanings:
13941394 63 PandocSomeError
13951395 64 PandocParseError
13961396 65 PandocParsecError
1397− 65 PandocMakePDFError TODO DUP
1397+ 66 PandocMakePDFError
13981398 67 PandocSyntaxMapError
13991399 83 PandocFilterError
14001400 91 PandocMacroLoop
src/Text/Pandoc/Error.hs+3−3
@@ -85,8 +85,8 @@ handleError (Left e) =
8585 if sourceName errPos == "source"
8686 then errorInFile
8787 else ""
88− PandocMakePDFError s -> err 65 s
89− PandocOptionError s -> err 2 s
88+ PandocMakePDFError s -> err 66 s
89+ PandocOptionError s -> err 6 s
9090 PandocSyntaxMapError s -> err 67 s
9191 PandocFailOnWarningError -> err 3 "Failing because there were warnings."
9292 PandocPDFProgramNotFoundError pdfprog -> err 47 $
@@ -99,7 +99,7 @@ handleError (Left e) =
9999 PandocResourceNotFound fn -> err 99 $
100100 "File " ++ fn ++ " not found in resource path"
101101 PandocTemplateError s -> err 5 $ "Error compiling template " ++ s
102− PandocAppError s -> err 1 s
102+ PandocAppError s -> err 4 s
103103 PandocEpubSubdirectoryError s -> err 31 $
104104 "EPUB subdirectory name '" ++ s ++ "' contains illegal characters"
105105 PandocMacroLoop s -> err 91 $