shex_validation/
schema_without_imports_error.rs1use iri_s::{IriS, IriSError};
2use shex_ast::{ShapeExpr, ShapeExprLabel};
3use thiserror::Error;
4
5#[derive(Error, Debug, Clone)]
6pub enum SchemaWithoutImportsError {
7 #[error("Obtaining schema from IRI {iri}. Tried to parse this list of formats: {formats} but they failed")]
8 SchemaFromIriRotatingFormats { iri: IriS, formats: String },
9
10 #[error("Dereferencing IRI {iri}. Error: {error}")]
11 DereferencingIri { iri: IriS, error: String },
12
13 #[error("ShExC error {error}. String: {content}")]
14 ShExCError { error: String, content: String },
15
16 #[error("ShExJ error at IRI: {iri}. Error: {error}")]
17 ShExJError { iri: IriS, error: String },
18
19 #[error("Duplicated declaration for shape expr with label {label}\nPrevious shape expr from {imported_from:?}\n{old_shape_expr:?}\nShape Expr2 {shape_expr2:?}")]
20 DuplicatedShapeDecl {
21 label: ShapeExprLabel,
22 old_shape_expr: Box<ShapeExpr>,
23 imported_from: IriS,
24 shape_expr2: Box<ShapeExpr>,
25 },
26
27 #[error("Resolving string: {str} as IRI with base: {base}")]
28 ResolvingStrIri {
29 str: String,
30 base: Box<IriS>,
31 error: Box<IriSError>,
32 },
33}