use thiserror::Error;
#[derive(Error, Debug, Clone)]
pub enum IntegrateError {
#[error("Computation error: {0}")]
ComputationError(String),
#[error("Convergence error: {0}")]
ConvergenceError(String),
#[error("Value error: {0}")]
ValueError(String),
#[error("Invalid input: {0}")]
InvalidInput(String),
#[error("Not implemented: {0}")]
NotImplementedError(String),
#[error("Linear solve error: {0}")]
LinearSolveError(String),
#[error("Dimension mismatch: {0}")]
DimensionMismatch(String),
#[error("Method switching error: {0}")]
MethodSwitchingError(String),
#[error("Step size too small: {0}")]
StepSizeTooSmall(String),
#[error("Index error: {0}")]
IndexError(String),
}
pub type IntegrateResult<T> = std::result::Result<T, IntegrateError>;
pub type Result<T> = std::result::Result<T, IntegrateError>;