use thiserror::Error;
#[derive(Error, Debug)]
pub enum ShaclError {
#[error(
"Unsupported SHACL schema format: '{format}'. Valid formats are: 'internal', 'turtle', 'ntriples', 'rdfxml', 'trig', 'n3', 'nquads', 'jsonld'"
)]
UnsupportedShaclSchemaFormat { format: String },
#[error("SHACL schema format 'internal' is not readable. It can only be used for writing SHACL schemas.")]
InternalSHACLFormatNonReadable,
#[error("SHACL source specification error: {message}")]
DataSourceSpec { message: String },
#[error("Failed to parse SHACL schema from '{source_name}' with format '{format}': {error}")]
FailedParsingShaclSchema {
source_name: String,
format: String,
error: String,
},
#[error("No SHACL shapes loaded")]
NoShaclShapesLoaded,
#[error("Failed to compile SHACL schema: {error}")]
FailedCompilingShaclSchema { error: String },
#[error("Failed I/O operation: {error}")]
FailedIoOperation { error: String },
#[error("SHACL validation failed: {error}")]
FailedShaclValidation { error: String },
#[error("No SHACL validation results available")]
NoShaclValidationResultsAvailable,
}