use thiserror::Error;

#[derive(Debug, Error)]
pub enum OntologyError {
    #[error("nickel export failed on '{path}': {stderr}")]
    NickelExport { path: String, stderr: String },

    #[error("failed to parse '{section}' from nickel output: {source}")]
    Parse {
        section: &'static str,
        #[source]
        source: serde_json::Error,
    },

    #[error("ontology directory '{0}' is missing expected file '{1}'")]
    MissingFile(String, String),
}
