diff rust/rhg/src/exitcode.rs @ 46820:821929d59e01

rhg: add support for detailed exit code for ConfigParseError This patch adds basic support for detailed exit code to rhg with support for ConfigParseError. For now, if parsing the config results in error, we silently fallbacks to `false`. The python version in this case emits a traceback. Differential Revision: https://phab.mercurial-scm.org/D10253
author Pulkit Goyal <7895pulkit@gmail.com>
date Sat, 20 Mar 2021 02:03:57 +0530
parents b1f2c2b336ec
children
line wrap: on
line diff
--- a/rust/rhg/src/exitcode.rs	Thu Mar 25 18:02:08 2021 +0100
+++ b/rust/rhg/src/exitcode.rs	Sat Mar 20 02:03:57 2021 +0530
@@ -6,6 +6,9 @@
 /// Generic abort
 pub const ABORT: ExitCode = 255;
 
+// Abort when there is a config related error
+pub const CONFIG_ERROR_ABORT: ExitCode = 30;
+
 /// Generic something completed but did not succeed
 pub const UNSUCCESSFUL: ExitCode = 1;