ontoref-code/crates/ontoref-daemon/src/error.rs
Jesús Pérez 2d87d60bb5
Some checks failed
Rust CI / Security Audit (push) Has been cancelled
Rust CI / Check + Test + Lint (nightly) (push) Has been cancelled
Rust CI / Check + Test + Lint (stable) (push) Has been cancelled
chore: add src code
2026-03-13 00:18:14 +00:00

25 lines
592 B
Rust

use thiserror::Error;
#[derive(Error, Debug)]
pub enum DaemonError {
#[error("NCL export failed for {path}: {reason}")]
NclExport { path: String, reason: String },
#[error("File watcher error: {0}")]
Watcher(String),
#[error("IO error: {0}")]
Io(#[from] std::io::Error),
#[error("JSON error: {0}")]
Json(#[from] serde_json::Error),
#[error("Configuration error: {0}")]
Config(String),
#[cfg(feature = "db")]
#[error("Database error: {0}")]
Db(#[from] stratum_db::DbError),
}
pub type Result<T> = std::result::Result<T, DaemonError>;