1use thiserror::Error;
4
5pub type Result<T> = std::result::Result<T, TableError>;
7
8#[derive(Debug, Error)]
10pub enum TableError {
11 #[error("PDF operation failed: {0}")]
13 PdfError(#[from] lopdf::Error),
14
15 #[error("Invalid table structure: {0}")]
17 InvalidTable(String),
18
19 #[error("Layout calculation failed: {0}")]
21 LayoutError(String),
22
23 #[error("Invalid style configuration: {0}")]
25 StyleError(String),
26
27 #[error("Text rendering failed: {0}")]
29 TextError(String),
30
31 #[error("Invalid dimensions: {0}")]
33 DimensionError(String),
34
35 #[error("Page with ID {0:?} not found")]
37 PageNotFound(lopdf::ObjectId),
38
39 #[error("Drawing operation failed: {0}")]
41 DrawingError(String),
42}