vision_calibration_core/
error.rs1#[derive(Debug, thiserror::Error)]
5#[non_exhaustive]
6pub enum Error {
7 #[error("invalid input: {reason}")]
9 InvalidInput { reason: String },
10
11 #[error("insufficient data: need {need}, got {got}")]
13 InsufficientData { need: usize, got: usize },
14
15 #[error("singular matrix or degenerate configuration")]
17 Singular,
18
19 #[error("numerical failure: {0}")]
21 Numerical(String),
22}
23
24impl Error {
25 pub(crate) fn invalid_input(reason: impl Into<String>) -> Self {
27 Self::InvalidInput {
28 reason: reason.into(),
29 }
30 }
31}