ses_pdf/error.rs
1use thiserror::Error;
2
3/// All errors that can occur during report compilation.
4#[derive(Debug, Error)]
5pub enum PdfError {
6 /// The Typst source generated from the document model contained a syntax or semantic error.
7 #[error("typst compilation error: {0}")]
8 Compile(String),
9
10 /// The Typst PDF export step failed.
11 #[error("typst PDF export error: {0}")]
12 Export(String),
13
14 /// A chart could not be rendered to SVG.
15 #[error("chart render error: {0}")]
16 Chart(String),
17
18 /// Font loading from the bundled asset store failed.
19 #[error("font loading error: {0}")]
20 FontLoad(String),
21
22 /// A required field was not set on a builder.
23 #[error("incomplete builder: {0}")]
24 Builder(&'static str),
25}