1use thiserror::Error;
2
3#[derive(Error, Debug, uniffi::Enum)]
4pub enum NbisError {
5 #[error("Failed to interpret provided bytes as a PNG/JPEG image")]
6 ImageLoadError,
7 #[error("Failed to read file at the specified path: {0}")]
8 FileReadError(String),
9 #[error("quality must be between 0.0 and 1.0, got: {0}")]
10 InvalidQuality(f64),
11 #[error("An unexpected NBIS error occurred: {0}")]
12 UnexpectedError(i64),
13 #[error("Template could not be parsed: {0}")]
14 InvalidTemplate(String),
15}