Skip to main content

brepkit_check/
error.rs

1//! Error types for the check crate.
2
3/// Errors from topology algorithm operations.
4#[derive(Debug, thiserror::Error)]
5pub enum CheckError {
6    /// A referenced topology entity was not found.
7    #[error(transparent)]
8    Topology(#[from] brepkit_topology::TopologyError),
9
10    /// A math error occurred.
11    #[error(transparent)]
12    Math(#[from] brepkit_math::MathError),
13
14    /// Classification could not determine a result.
15    #[error("classification failed: {0}")]
16    ClassificationFailed(String),
17
18    /// A validation check encountered an internal error.
19    #[error("validation error: {0}")]
20    ValidationFailed(String),
21
22    /// Numerical integration did not converge.
23    #[error("integration did not converge: {0}")]
24    IntegrationFailed(String),
25
26    /// Distance computation could not find a result.
27    #[error("distance computation failed: {0}")]
28    DistanceFailed(String),
29}