Skip to main content

symbios_shape/
error.rs

1use thiserror::Error;
2
3#[derive(Error, Debug, PartialEq)]
4pub enum ShapeError {
5    #[error("Parse error: {0}")]
6    ParseError(String),
7    #[error("Non-finite numeric value detected (NaN/Inf)")]
8    InvalidNumericValue,
9    #[error("Scope capacity overflow")]
10    CapacityOverflow,
11    #[error("Split sizes are empty")]
12    EmptySplit,
13    #[error("Split floating size must be positive: {0}")]
14    InvalidFloatingSize(f64),
15    #[error("Split absolute sizes exceed scope dimension {0}")]
16    SplitOverflow(f64),
17    #[error("No floating slots to absorb remainder in split")]
18    NoFloatingSlots,
19    #[error("Comp selector '{0}' not recognised")]
20    UnknownCompSelector(String),
21    #[error("Derivation depth limit {0} exceeded")]
22    DepthLimitExceeded(usize),
23    #[error("Internal error: {0}")]
24    Internal(String),
25    #[error("Offset inset distance exceeds scope dimension")]
26    OffsetTooLarge,
27    #[error("Roof angle must be in (0°, 90°): got {0}")]
28    InvalidRoofAngle(f64),
29    #[error("Align target vector must be non-zero")]
30    InvalidAlignTarget,
31}