pub enum CliError {
NotImplemented {
what: &'static str,
hint: &'static str,
},
NotInWorkspace {
searched_from: PathBuf,
},
Io(Error),
Other {
message: String,
exit_code: u8,
},
Silent {
exit_code: u8,
},
}Expand description
Top-level CLI failure mode.
Variants§
NotImplemented
A defined subcommand whose body has not yet landed. The hint
field is appended to the message so the user knows where to
look for the planned design / when to expect it.
NotInWorkspace
The current working directory is not inside an Aristo workspace
(no aristo.toml found by walking upward).
Io(Error)
I/O failure during file read/write.
Other
Catch-all for command-specific errors that carry their own message
and exit code. Use when no structured variant fits and the message
is the user-facing diagnostic (e.g. aristo lang’s
“no supported language detected”).
Silent
Non-success exit where the command has already printed its own
human-readable output (e.g. aristo lint --check listing
findings). Lib’s top-level wrapper skips the generic
error: ... line for this variant.
Implementations§
Trait Implementations§
Source§impl Error for CliError
impl Error for CliError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()