bytebraise/data_smart/
errors.rs1use std::io;
2
3use thiserror::Error;
4
5#[derive(Error, Debug)]
6pub enum DataSmartError {
7 #[error("Unable to convert")]
8 DataConversionError,
9
10 #[cfg(test)]
11 #[error("Attempt to use ? operator on None")]
12 UnwrapNoneError,
13
14 #[error("")]
15 #[cfg(feature = "python")]
16 PythonError {
17 #[from]
18 source: pyo3::PyErr,
19 },
20
21 #[error("TODO")]
22 IoError {
23 #[from]
24 source: io::Error,
25 },
26
27 #[error("")]
28 #[cfg(feature = "python")]
29 PythonSyntaxError { source: pyo3::PyErr },
30
31 #[error("A variable references itself")]
32 RecursiveReferenceError { var: String },
33}
34
35pub type DataSmartResult<T> = anyhow::Result<T>;