Skip to main content

quad_rs/core/
error.rs

1#[derive(thiserror::Error, Debug, PartialEq)]
2/// Error type for integrator
3pub enum IntegratorError<T> {
4    #[error("exceeded the maximum number of function evaluations before convergence")]
5    ExceededMaxFunctionEvaluations,
6    #[error("non-finite error estimate")]
7    NonFiniteErrorEstimate,
8    #[error("no segments found")]
9    NoSegments,
10    #[error("empty integration segment")]
11    EmptySegment,
12    #[error("non-finite integrand at {point:?}")]
13    NonFiniteIntegrand { point: T },
14    #[error("possible singularity at {singularity:?}")]
15    PossibleSingularity { singularity: T },
16    #[error("refined contour piece smaller than minimum")]
17    PieceTooSmall,
18}