honeycomb_core/cmap/
error.rs1use crate::{attributes::AttributeError, cmap::DartIdType};
4
5#[derive(Debug, thiserror::Error, PartialEq, Eq)]
7pub enum LinkError {
8 #[error("cannot link {1} to {2}: b{0}({1}) != NULL")]
10 NonFreeBase(u8, DartIdType, DartIdType),
11 #[error("cannot link {1} to {2}: b{0}({2}) != NULL")]
13 NonFreeImage(u8, DartIdType, DartIdType),
14 #[error("cannot unlink {1}: b{0}({1}) == NULL")]
16 AlreadyFree(u8, DartIdType),
17 #[error("cannot 3-link {0} and {1}: faces do not have the same structure")]
19 AsymmetricalFaces(DartIdType, DartIdType),
20}
21
22#[derive(Debug, thiserror::Error, PartialEq, Eq)]
24pub enum SewError {
25 #[error("cannot {0}-sew darts {1} and {2} due to geometry predicates")]
27 BadGeometry(u8, DartIdType, DartIdType),
28 #[error("inner link failed: {0}")]
30 FailedLink(#[from] LinkError),
31 #[error("attribute operation failed: {0}")]
33 FailedAttributeOp(#[from] AttributeError),
34}