Skip to main content

graphitepdf_math/
error.rs

1pub type Result<T> = std::result::Result<T, Error>;
2
3#[derive(Debug, thiserror::Error)]
4pub enum Error {
5    #[error(transparent)]
6    GraphitepdfErrors(#[from] graphitepdf_errors::GraphitePdfError),
7
8    #[error(transparent)]
9    Svg(#[from] graphitepdf_svg::Error),
10
11    #[error("math render backend error: {0}")]
12    MathBackend(String),
13
14    #[error("invalid math dimension `{input}`")]
15    InvalidDimension { input: String },
16
17    #[error("math SVG is missing a valid viewBox")]
18    InvalidViewBox,
19
20    #[error("math backend returned an invalid SVG root")]
21    InvalidSvgRoot,
22}