clap_runner/command/
error.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
use faststr::FastStr;

#[derive(Debug, thiserror::Error)]
pub enum Error {
    #[error("command name illegal: {hint}")]
    CommandNameIllegal { hint: FastStr },
    #[error("param parse failed: {hint}")]
    Param { hint: FastStr },
    #[error(transparent)]
    Unknown(#[from] anyhow::Error),
}

pub(super) type Result<T> = std::result::Result<T, Error>;