strixonomy_reasoner/
error.rs1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum ReasonerError {
5 #[error("core error: {0}")]
6 Core(#[from] strixonomy_core::StrixonomyError),
7
8 #[error("load error in {path}: {message}")]
9 Load { path: std::path::PathBuf, message: String },
10
11 #[error("unsupported profile: {0}")]
12 UnsupportedProfile(String),
13
14 #[error("ontology error: {0}")]
15 Ontology(String),
16
17 #[error("classification error: {0}")]
18 Classify(String),
19
20 #[error("explanation error: {0}")]
21 Explain(String),
22
23 #[error("no classification result cached; run reasoner first")]
24 NotClassified,
25
26 #[error("class not found: {0}")]
27 ClassNotFound(String),
28
29 #[error("explanation not available for class: {0}")]
30 ExplanationUnavailable(String),
31
32 #[error("individual not found: {0}")]
33 IndividualNotFound(String),
34
35 #[error("reasoner run cancelled")]
36 Cancelled,
37}
38
39pub type Result<T> = std::result::Result<T, ReasonerError>;