transforms/geometry/transform/
error.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use crate::errors::{QuaternionError, TimestampError};
use alloc::string::String;
use thiserror::Error;

#[derive(Error, Debug)]
pub enum TransformError {
    #[error("Transform timestamps do not match (lhs: {0}, rhs: {1})")]
    TimestampMismatch(f64, f64),

    #[error("Cannot multiply transforms with the same frame")]
    SameFrameMultiplication,

    #[error("Frames do not have a parent-child relationship")]
    IncompatibleFrames,

    #[error("Transform not found from {0} to {1}")]
    NotFound(String, String),

    #[error("Transform tree is empty")]
    TransformTreeEmpty,

    #[error("Timestamp error: {0}")]
    TimestampError(#[from] TimestampError),

    #[error("Quaternion error: {0}")]
    QuaternionError(#[from] QuaternionError),
}