matrix_math/
error.rs

1//! Not all errors are used that's why.
2#![allow(dead_code)]
3
4use crate::types::MatrixRef;
5
6#[derive(Debug, thiserror::Error)]
7pub enum MatrixError<'m, T> {
8    #[error("The matrix {0} is empty")]
9    Empty(MatrixRef<'m, T>),
10    #[error("Matrices aren't equal! {0} != {1}")]
11    NotEqual(MatrixRef<'m, T>, MatrixRef<'m, T>),
12}
13
14#[derive(Debug, thiserror::Error)]
15pub enum Error {
16    #[error("Generic error: {0}")]
17    Generic(String),
18}