leftwm_core/errors.rs
1use thiserror::Error;
2
3pub type Result<T> = std::result::Result<T, LeftError>;
4
5#[derive(Debug, Error)]
6pub enum LeftError {
7 // TODO move StateSocket away from lib OR use Config::save_state?
8 #[error("Parsing error: {0}")]
9 SerdeParse(#[from] serde_json::error::Error),
10 #[error("IO error: {0}")]
11 IoError(#[from] std::io::Error),
12 // TODO move Nanny to bin
13 #[error("XDG error: {0}")]
14 XdgBaseDirError(#[from] xdg::BaseDirectoriesError),
15 #[error("Stream error")]
16 StreamError,
17 #[error("Liquid parsing error")]
18 LiquidParsingError,
19}