use thiserror::Error;
pub type Result<T> = std::result::Result<T, SQuaJLError>;
#[derive(Debug, Error)]
pub enum SQuaJLError {
#[error("invalid configuration: {0}")]
InvalidConfig(String),
#[error("dimension mismatch: expected {expected}, got {actual}")]
DimensionMismatch {
expected: usize,
actual: usize,
},
#[error("vector norm must be positive")]
ZeroNorm,
#[error("incompatible quantized vector: {0}")]
IncompatibleCode(String),
#[cfg(feature = "fastembed")]
#[error("backend error: {0}")]
Backend(String),
}