use thiserror::Error;
#[derive(Debug, Error)]
#[non_exhaustive]
pub enum ConversionError {
#[error(
"The DbValue cannot be converted into the desired rust type: value types do not match"
)]
ValueType(String),
#[error(
"The DbValue is too big or too small for the desired rust type: number range exceeded"
)]
NumberRange(String),
#[error(
"The DbValue was not yet completely loaded, and further loading is not possible anymore"
)]
Incomplete(String),
#[error("Conversion fails due to given root cause")]
Other(Box<dyn std::error::Error + Send + Sync>),
}