use thiserror::Error;
#[derive(Error, Debug)]
pub enum SimulationError {
#[error("An invalid model configuration was encountered during simulation")]
InvalidModelConfiguration,
#[error("A specified model cannot be found in the simulation")]
ModelNotFound,
#[error("A specified model port cannot be found in the simulation")]
PortNotFound,
#[error("A model failed to clone during simulation")]
ModelCloneError,
#[error("An invalid model state was encountered")]
InvalidModelState,
#[error("An invalid state was encountered, with respect to event scheduling")]
EventSchedulingError,
#[error("An invalid inter-model message was encountered")]
InvalidMessage,
#[error("Failed to serialize a simulation model")]
SerializationError,
#[error("A polynomial was configured in a simulation, but the coefficients are empty")]
EmptyPolynomial,
#[error(transparent)]
JSONError(#[from] serde_json::error::Error),
#[error(transparent)]
BetaError(#[from] rand_distr::BetaError),
#[error(transparent)]
ExpError(#[from] rand_distr::ExpError),
#[error(transparent)]
GammaError(#[from] rand_distr::GammaError),
#[error(transparent)]
NormalError(#[from] rand_distr::NormalError),
#[error(transparent)]
TriangularError(#[from] rand_distr::TriangularError),
#[error(transparent)]
WeibullError(#[from] rand_distr::WeibullError),
#[error(transparent)]
BernoulliError(#[from] rand_distr::BernoulliError),
#[error(transparent)]
GeoError(#[from] rand_distr::GeoError),
#[error(transparent)]
PoissonError(#[from] rand_distr::PoissonError),
#[error(transparent)]
WeightedError(#[from] rand_distr::WeightedError),
}