ppt_rs/
error.rs

1//! Error types for ppt-rs
2
3use thiserror::Error;
4
5/// Result type alias for ppt-rs operations
6pub type Result<T> = std::result::Result<T, PptError>;
7
8/// Main error type for ppt-rs
9#[derive(Error, Debug)]
10pub enum PptError {
11    #[error("IO error: {0}")]
12    Io(#[from] std::io::Error),
13
14    #[error("XML parsing error: {0}")]
15    Xml(String),
16
17    #[error("ZIP archive error: {0}")]
18    Zip(#[from] zip::result::ZipError),
19
20    #[error("Invalid package: {0}")]
21    InvalidPackage(String),
22
23    #[error("Part not found: {0}")]
24    PartNotFound(String),
25
26    #[error("Invalid content type: {0}")]
27    InvalidContentType(String),
28
29    #[error("Invalid relationship type: {0}")]
30    InvalidRelationshipType(String),
31
32    #[error("Value error: {0}")]
33    ValueError(String),
34
35    #[error("Not implemented: {0}")]
36    NotImplemented(String),
37}
38