scirs2_transform/
error.rs

1//! Error types for the data transformation module
2
3use thiserror::Error;
4
5/// Error type for data transformation operations
6#[derive(Error, Debug)]
7pub enum TransformError {
8    /// Invalid input data
9    #[error("Invalid input: {0}")]
10    InvalidInput(String),
11
12    /// Transformation error
13    #[error("Transformation error: {0}")]
14    TransformationError(String),
15
16    /// Core error
17    #[error("Core error: {0}")]
18    CoreError(#[from] scirs2_core::error::CoreError),
19
20    /// Linear algebra error
21    #[error("Linear algebra error: {0}")]
22    LinalgError(#[from] scirs2_linalg::error::LinalgError),
23
24    /// IO error
25    #[error("IO error: {0}")]
26    IoError(#[from] std::io::Error),
27
28    /// Other error
29    #[error("Error: {0}")]
30    Other(String),
31}
32
33/// Result type for data transformation operations
34pub type Result<T> = std::result::Result<T, TransformError>;