#[non_exhaustive]pub enum IngestError {
Line(usize, &'static str),
Turtle(String),
TriG(String),
RdfXml(String),
UnknownFormat(String),
Rdf12TurtleUnavailable,
Io(String),
InvalidIri {
location: String,
token: String,
reason: &'static str,
},
}Expand description
Why an ingest failed. Parser errors from oxttl/oxrdfxml and I/O errors
are flattened to their Display string rather than wrapped: the variants
then carry no foreign types, which keeps the error usable from the wasm
bindings and stable across upstream parser upgrades.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Line(usize, &'static str)
A malformed N-Triples/N-Quads line: its 1-based line number and a short
reason ("bad subject", "missing trailing '.'", …).
Turtle(String)
The Turtle parser rejected the input.
TriG(String)
The TriG parser rejected the input.
RdfXml(String)
The RDF/XML parser rejected the input.
UnknownFormat(String)
The requested format is not one this crate can parse.
QuotedTripleSurface::Rdf12 was asked for on a Turtle/TriG input, but
this build of rete-core has the rdf12-turtle feature off, so the
RDF 1.2 reader was not compiled in. Refused by name rather than read as
RDF-star, which would be the wrong graph told in silence.
Io(String)
The input could not be read (streaming builds surface the path here).
InvalidIri
An IRI outside the N-Triples/N-Quads IRIREF grammar / RFC 3987, refused
because the caller asked for a strict IriAudit (rete build --strict). Without strict the same finding is only counted.
location is line N for the line-based syntaxes, the format name for
the others (oxttl reports its own positions).
Trait Implementations§
Source§impl Debug for IngestError
impl Debug for IngestError
Source§impl Display for IngestError
impl Display for IngestError
Source§impl Error for IngestError
impl Error for IngestError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()