1use thiserror::Error;
4
5#[derive(Debug, Error)]
7pub enum Error {
8 #[error("Invalid topic pattern: {0}")]
9 InvalidTopic(String),
10
11 #[error("Hat not found: {0}")]
12 HatNotFound(String),
13
14 #[error("Event parse error: {0}")]
15 EventParse(String),
16
17 #[error("CLI execution error: {0}")]
18 CliExecution(String),
19
20 #[error("Configuration error: {0}")]
21 Config(String),
22
23 #[error("IO error: {0}")]
24 Io(#[from] std::io::Error),
25
26 #[error("Loop terminated: {0}")]
27 LoopTerminated(String),
28}
29
30pub type Result<T> = std::result::Result<T, Error>;