1use thiserror::Error;
4
5#[derive(Error, Debug)]
7pub enum VisioError {
8 #[error("I/O error: {0}")]
9 Io(#[from] std::io::Error),
10
11 #[error("ZIP error: {0}")]
12 Zip(#[from] zip::result::ZipError),
13
14 #[error("XML parse error: {0}")]
15 Xml(String),
16
17 #[error("Invalid Visio file: {0}")]
18 InvalidFile(String),
19
20 #[error("Unsupported format: {0}")]
21 UnsupportedFormat(String),
22
23 #[error("CFB/OLE2 error: {0}")]
24 Cfb(String),
25
26 #[error("Decompression error: {0}")]
27 Decompression(String),
28
29 #[error("Page not found: {0}")]
30 PageNotFound(usize),
31}
32
33pub type Result<T> = std::result::Result<T, VisioError>;