1use thiserror::Error;
4
5pub mod messages;
7
8#[derive(Error, Debug)]
10pub enum PptxError {
11 #[error("Generic pptx error: {0}")]
12 Generic(String),
13
14 #[error("Package not found: {0}")]
15 PackageNotFound(String),
16
17 #[error("Invalid XML: {0}")]
18 InvalidXml(String),
19
20 #[error("IO error: {0}")]
21 Io(#[from] std::io::Error),
22
23 #[error("ZIP error: {0}")]
24 Zip(#[from] zip::result::ZipError),
25
26 #[error("XML parse error: {0}")]
27 XmlParse(String),
28
29 #[error("Invalid value: {0}")]
30 InvalidValue(String),
31
32 #[error("Not found: {0}")]
33 NotFound(String),
34
35 #[error("Invalid state: {0}")]
36 InvalidState(String),
37
38 #[error("Invalid operation: {0}")]
39 InvalidOperation(String),
40}
41
42pub type Result<T> = std::result::Result<T, PptxError>;