use thiserror::Error;
use crate::entity::{EntityId, EntityKind};
pub type Result<T> = std::result::Result<T, Error>;
#[derive(Debug, Error, Clone, PartialEq, Eq)]
pub enum Error {
#[error("invalid IRI: {0}")]
InvalidIri(String),
#[error("entity kind mismatch for {iri}: expected {expected:?}, found {found:?}")]
EntityKindMismatch {
iri: String,
expected: EntityKind,
found: EntityKind,
},
#[error("unknown entity: {0:?}")]
UnknownEntity(EntityId),
#[error("invalid axiom: {0}")]
InvalidAxiom(String),
#[error("ontology file parsing is not available on ontologos-core; use ontologos_parser::load_ontology")]
ParseNotAvailable,
#[error("parse error: {0}")]
Parse(String),
#[error("serialization error: {0}")]
Serialization(String),
#[error("ontology not loaded")]
OntologyNotLoaded,
#[error("reasoning not yet implemented")]
NotImplemented,
#[error("{0}")]
Message(String),
}