Skip to main content

pdf_pptx/
error.rs

1//! Error types for PDF to PPTX conversion.
2
3// Copyright (c) 2026 Innovation Trigger B.V.
4//
5// PDFluent is available under two licences, at your option: the GNU AGPLv3, or
6// the PDFluent Commercial Licence. See the LICENSE file in this repository --
7// that file travels with the copy you received, which a URL does not.
8
9use 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>;