#[non_exhaustive]pub enum CoreError {
TableTooShort {
min: usize,
got: usize,
},
TableLengthMismatch {
xs: usize,
ys: usize,
},
TableNotFinite {
index: usize,
},
TableNotIncreasing {
index: usize,
},
OutOfRange {
x: f64,
min: f64,
max: f64,
},
TableOverflow {
interval: usize,
},
ExtrapolationOverflow {
x: f64,
},
NanLookup,
InvalidRandomState,
QuadratureNotFinite {
x: f64,
},
QuadratureDidNotConverge {
component: usize,
value: f64,
error: f64,
intervals: usize,
},
Domain {
what: &'static str,
value: f64,
},
}Expand description
An error from a core model: a table that can’t be built, a lookup it refuses, or an input outside a model’s domain.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
TableTooShort
A table needs at least min knots.
TableLengthMismatch
The abscissa and ordinate columns have different lengths.
TableNotFinite
A table value is NaN or infinite.
TableNotIncreasing
Abscissae must strictly increase.
OutOfRange
A lookup outside the table, on a table whose policy is crate::interp::Extrapolation::Error.
TableOverflow
An interval’s width, its secant slope or a spline slope overflows f64.
ExtrapolationOverflow
Linear extrapolation gave a value that is not finite.
NanLookup
A lookup at NaN.
InvalidRandomState
A serialized random generator state that is not four 0x-prefixed hexadecimal 64-bit
words, or is all zero.
QuadratureNotFinite
An integrand returned NaN or an infinity.
QuadratureDidNotConverge
Adaptive integration didn’t meet its tolerance within its subinterval budget.
Fields
Domain
An input outside a model’s domain, such as a latitude beyond ±90°.
Trait Implementations§
Source§impl Error for CoreError
impl Error for CoreError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()