Debian Codegraph @

rust/hg-core/src/exit_codes.rs

raw
1 pub type ExitCode = i32;
2
3 /// Successful exit
4 pub const OK: ExitCode = 0;
5
6 /// Generic abort
7 pub const ABORT: ExitCode = 255;
8
9 /// Indicates that the user made an error in their input
10 pub const INPUT_ERROR: ExitCode = 10;
11
12 // Abort when there is a config related error
13 pub const CONFIG_ERROR_ABORT: ExitCode = 30;
14
15 /// Indicates that the operation might work if retried in a different state.
16 /// Examples: Unresolved merge conflicts, unfinished operations
17 pub const STATE_ERROR: ExitCode = 20;
18
19 // Abort when there is an error while parsing config
20 pub const CONFIG_PARSE_ERROR_ABORT: ExitCode = 10;
21
22 /// Generic something completed but did not succeed
23 pub const UNSUCCESSFUL: ExitCode = 1;
24
25 /// Command or feature not implemented by rhg
26 pub const UNIMPLEMENTED: ExitCode = 252;
27
28 /// The fallback path is not valid
29 pub const INVALID_FALLBACK: ExitCode = 253;