parry3d/transformation/convex_hull3/error.rs
#[derive(thiserror::Error, Debug, PartialEq)]
/// Errors generated by the convex-hull calculation.
pub enum ConvexHullError {
/// Reached an impossible configuration in the convex-hull calculation,
/// likely because of a bug.
#[error("Internal error: {0}")]
InternalError(&'static str),
/// The convex hull calculation was unable to find a support point.
/// This generally happens if the input point set contains invalid points (with NaN coordinates)
/// or if they are almost coplanar.
#[error("Input points are either invalid (NaN) or are almost coplanar.")]
MissingSupportPoint,
/// The convex-hull calculation failed because less than 3 points were provided.
#[error("Less than 3 points were given to the convex-hull algorithm.")]
IncompleteInput,
/// Reached a piece of code we shouldn’t (internal error).
#[error("Internal error: unreachable code path")]
Unreachable,
}