einops/
error.rs

1use thiserror::Error;
2
3/// Different categories of error that can be encountered
4#[derive(Error, Debug)]
5pub enum EinopsError {
6    /// Error when parsing the pattern/expression provided
7    #[error("expression parse error: {0}")]
8    Parse(String),
9
10    /// Error when a pattern violates rules set by einops
11    #[error("pattern rules violated: {0}")]
12    Pattern(String),
13
14    /// Error because of invalid/missing identifiers of axes, or their sizes
15    #[error("invalid input found: {0}")]
16    InvalidInput(String),
17}