1#[derive(thiserror::Error, Debug)]
2pub enum KandError {
3 #[error("Invalid parameter value provided to the function")]
4 InvalidParameter,
5
6 #[error("Insufficient data points for the requested calculation")]
7 InsufficientData,
8
9 #[error("Input data contains NaN (Not a Number) values")]
10 NaNDetected,
11
12 #[error("Input arrays have mismatched lengths")]
13 LengthMismatch,
14
15 #[error("Input data is invalid (out of range or empty)")]
16 InvalidData,
17
18 #[error("File operation error occurred")]
19 FileError,
20
21 #[error("Failed to convert between numeric types")]
22 ConversionError,
23
24 #[error("Invalid input: {0}")]
25 InvalidInput(String),
26
27 #[error("Calculation error: {0}")]
28 CalculationError(String),
29}
30
31pub type Result<T> = std::result::Result<T, KandError>;