fast_gicp/
error.rs

1//! Error types for the fast_gicp library
2
3use thiserror::Error;
4
5/// Error types for fast_gicp operations
6#[derive(Error, Debug)]
7pub enum Error {
8    #[error("Point cloud is empty")]
9    EmptyPointCloud,
10
11    #[error("Point cloud index out of bounds: {index}")]
12    IndexOutOfBounds { index: usize },
13
14    #[error("Registration failed to converge")]
15    RegistrationFailed,
16
17    #[error("Invalid parameter: {message}")]
18    InvalidParameter { message: String },
19
20    #[error("Internal C++ error: {message}")]
21    CppError { message: String },
22
23    #[error("Memory allocation failed")]
24    AllocationError,
25
26    #[error("Feature not available: {feature}")]
27    FeatureNotAvailable { feature: String },
28}
29
30/// Result type for fast_gicp operations
31pub type Result<T> = std::result::Result<T, Error>;