bookforge_core/error.rs
1use thiserror::Error;
2
3pub type Result<T> = std::result::Result<T, BookforgeError>;
4
5#[derive(Debug, Error)]
6pub enum BookforgeError {
7 #[error("I/O error: {0}")]
8 Io(#[from] std::io::Error),
9
10 #[error("invalid input: {0}")]
11 InvalidInput(String),
12
13 #[error("XML error: {0}")]
14 Xml(#[from] quick_xml::Error),
15
16 #[error("ZIP error: {0}")]
17 Zip(#[from] zip::result::ZipError),
18
19 #[error("operation is not implemented yet: {0}")]
20 NotImplemented(&'static str),
21}