use thiserror::Error as ThisError;
#[derive(Debug, ThisError, PartialEq)]
#[non_exhaustive]
pub enum Error {
#[error("Sample size must be at least {needed}, but was given {given}.")]
InsufficientSampleSize { given: usize, needed: usize },
#[error("Sample size must be at most {needed}, but was given {given}.")]
ExcessiveSampleSize { given: usize, needed: usize },
#[error("The range of the data is zero, the test cannot be computed.")]
ZeroRange,
#[error("Input data must not contain NaN values.")]
ContainsNaN,
#[error("Dimension mismatch: all input vectors must have the same dimension.")]
DimensionMismatch,
#[error("{0}")]
NormalDistributionError(#[from] statrs::distribution::NormalError),
#[error("{0}")]
GammaError(#[from] statrs::distribution::GammaError),
#[error("{0}")]
IntegrationError(#[from] eqsolver::SolverError),
#[error("{0}")]
Other(String),
}