xacli_components/error.rs
1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum ComponentError {
5 #[error("IO error: {0}")]
6 Io(#[from] std::io::Error),
7
8 #[error("Component interrupted")]
9 Interrupted,
10
11 #[error("Invalid input: {0}")]
12 InvalidInput(String),
13}
14
15pub type Result<T> = std::result::Result<T, ComponentError>;