use crate::common::share::ShareError;
use crate::common::types::fixed::FixedPointPrecision;
use thiserror::Error;
pub mod fixed;
pub mod integer;
#[derive(Error, Debug)]
pub enum TypeError {
#[error("error operating incompatible types - self precision: {current:?}, other precision: {other:?}")]
IncompatibleIntegerPrecision { current: usize, other: usize },
#[error("error operating incompatible types - self precision: {current:?}, other precision: {other:?}")]
IncompatibleFixedPointPrecision {
current: FixedPointPrecision,
other: FixedPointPrecision,
},
#[error("error operating with shares: {0:?}")]
ShareError(#[from] ShareError),
#[error("Division by Zero")]
DivisionByZero,
}