1use thiserror::Error;
10
11#[derive(Debug, Error)]
12pub enum PptxError {
13 #[error("PDF error: {0}")]
14 Pdf(#[from] lopdf::Error),
15
16 #[error("extraction error: {0}")]
17 Extract(#[from] pdf_extract::ExtractError),
18
19 #[error("XML error: {0}")]
20 Xml(#[from] quick_xml::Error),
21
22 #[error("ZIP error: {0}")]
23 Zip(#[from] zip::result::ZipError),
24
25 #[error("I/O error: {0}")]
26 Io(#[from] std::io::Error),
27
28 #[error("{0}")]
29 Other(String),
30}
31
32pub type Result<T> = std::result::Result<T, PptxError>;