Files
cjdic2/src-core/src/error.rs
T
2026-02-25 19:01:55 +07:00

27 lines
568 B
Rust

use thiserror::Error;
use zip::result::ZipError;
#[derive(Debug, Error)]
pub enum CJDicError {
#[error("Database error: {0}")]
Database(#[from] rusqlite::Error),
#[error("Serialization error: {0}")]
Serialization(#[from] serde_json::Error),
#[error("Anyhow error: {0}")]
AnyhowError(#[from] anyhow::Error),
#[error("IO error: {0}")]
IOError(#[from] std::io::Error),
#[error("File name not found")]
FileNameNotFound,
#[error("Zip error: {0}")]
ZipError(#[from] ZipError),
#[error("Not found")]
NotFound,
}