concision_core/
error.rs

1/*
2    Appellation: error <module>
3    Contrib: @FL03
4*/
5
6/// a type alias for a [Result] with a [Error]
7pub type Result<T = ()> = core::result::Result<T, Error>;
8
9#[derive(Debug, thiserror::Error)]
10pub enum Error {
11    #[error(transparent)]
12    MathError(#[from] concision_math::MathematicalError),
13    #[error(transparent)]
14    PadError(#[from] crate::ops::pad::error::PadError),
15    #[error(transparent)]
16    ParamError(#[from] crate::params::error::ParamsError),
17    #[error(transparent)]
18    ShapeError(#[from] ndarray::ShapeError),
19    #[cfg(feature = "anyhow")]
20    #[error(transparent)]
21    Other(#[from] anyhow::Error),
22    #[error("Unknown Error: {0}")]
23    Unknown(String),
24}