Mercurial > public > mercurial-scm > hg-stable
view 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 source
pub type ExitCode = i32; /// Successful exit pub const OK: ExitCode = 0; /// 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; /// Command or feature not implemented by rhg pub const UNIMPLEMENTED: ExitCode = 252;