xfa_layout_engine/error.rs
1//! Layout engine error types.
2
3use thiserror::Error;
4
5#[derive(Debug, Error)]
6pub enum LayoutError {
7 #[error("No matching page area for layout state")]
8 NoMatchingPageArea,
9
10 #[error("Content area overflow: cannot place content")]
11 ContentAreaOverflow,
12
13 #[error("Invalid measurement: {0}")]
14 InvalidMeasurement(String),
15
16 #[error("Layout error: {0}")]
17 General(String),
18}
19
20pub type Result<T> = std::result::Result<T, LayoutError>;