use thiserror::Error;
#[derive(Debug, Error)]
pub enum Error {
#[error("Invalid topic pattern: {0}")]
InvalidTopic(String),
#[error("Hat not found: {0}")]
HatNotFound(String),
#[error("Event parse error: {0}")]
EventParse(String),
#[error("CLI execution error: {0}")]
CliExecution(String),
#[error("Configuration error: {0}")]
Config(String),
#[error("IO error: {0}")]
Io(#[from] std::io::Error),
#[error("Loop terminated: {0}")]
LoopTerminated(String),
}
pub type Result<T> = std::result::Result<T, Error>;