1use thiserror::Error;
4
5#[derive(Error, Debug)]
7pub enum Error {
8 #[error("entry file not found: {0}")]
10 EntryNotFound(String),
11
12 #[error("entry file is not valid UTF-8")]
14 InvalidUtf8,
15
16 #[error("compilation failed:\n{0}")]
18 Compilation(String),
19
20 #[error("PDF generation failed: {0}")]
22 PdfGeneration(String),
23
24 #[error("PNG encoding failed: {0}")]
26 PngEncoding(String),
27
28 #[error("decompression failed")]
30 Decompression(#[from] std::io::Error),
31}
32
33pub type Result<T> = std::result::Result<T, Error>;