1#[derive(Debug, thiserror::Error)]
2pub enum CartesianTreeError {
3 #[error("Frame '{0}' is a root frame and has no parent")]
4 RootHasNoParent(String),
5 #[error("Frame handle is stale: the frame has been removed from its tree")]
6 FrameRemoved,
7 #[error("Cannot update transform for frame '{0}' as it has no parent")]
8 CannotUpdateRootTransform(String),
9 #[error("Operation not supported on derived frame '{0}'")]
10 DerivedFrameUnsupported(String),
11 #[error("A child frame with name '{0}' already exists for parent '{1}'")]
12 ChildNameConflict(String, String),
13 #[error("Frame '{1}' has no child named '{0}'")]
14 ChildNotFound(String, String),
15 #[error("Frames '{0}' and '{1}' belong to different trees")]
16 DifferentTrees(String, String),
17 #[error("Failed to find a common ancestor between frame '{0}' and '{1}'")]
18 NoCommonAncestor(String, String),
19 #[error("Frame '{0}' is not an ancestor of '{1}'")]
20 IsNoAncestor(String, String),
21 #[error("Invalid quaternion (x={0}, y={1}, z={2}, w={3}): norm is too close to zero")]
22 InvalidQuaternion(f64, f64, f64, f64),
23 #[error("Serialization/Deserialization error: {0}")]
24 SerdeError(#[from] serde_json::Error),
25 #[error("Tree structure mismatch during config apply: {0}")]
26 Mismatch(String),
27}