use thiserror::Error as ThisError;
#[derive(Debug, Clone, ThisError, PartialEq, Eq)]
pub enum ModelError {
#[error(
"Base function gave vector of length {}, but expected output length was {}",
actual_length,
expected_length
)]
UnexpectedFunctionOutput {
expected_length: usize,
actual_length: usize,
},
#[error("Parameter '{}' is not in model", parameter)]
ParameterNotInModel {
parameter: String,
},
#[error("Index {} for derivative is out of bounds", index)]
DerivativeIndexOutOfBounds {
index: usize,
},
#[error("Model expects {} parameters, but got {}", expected, actual)]
IncorrectParameterCount {
expected: usize,
actual: usize,
},
}