18 lines
392 B
Rust
18 lines
392 B
Rust
use thiserror::Error;
|
|
|
|
#[derive(Debug, Error)]
|
|
pub enum Error {
|
|
#[error("io: {0}")]
|
|
Io(#[from] std::io::Error),
|
|
#[error("config: {0}")]
|
|
Config(String),
|
|
#[error("not found: {0}")]
|
|
NotFound(String),
|
|
#[error("invalid input: {0}")]
|
|
Invalid(String),
|
|
#[error(transparent)]
|
|
Other(#[from] anyhow::Error),
|
|
}
|
|
|
|
pub type Result<T> = std::result::Result<T, Error>;
|