Enum rsonpath_lib::engine::error::EngineError
source · pub enum EngineError {
DepthBelowZero(usize, DepthError),
DepthAboveLimit(usize, DepthError),
MissingClosingCharacter(),
MalformedLabelQuotes(usize),
NotSupported(UnsupportedFeatureError),
}
Expand description
Error enum for all types of errors that can be reported during engine execution.
NOTE: These error are not guaranteed to be raised for every JSON document that is malformed in the respective manner. The engine may ignore such errors and simply produce incorrect results for invalid documents.
Variants§
DepthBelowZero(usize, DepthError)
Document depth fell below zero, which can only happen
if there are more closing than opening braces.
The inner usize
value indicates the position of the mismatched closing character.
DepthAboveLimit(usize, DepthError)
The depth limit was reached – the document is too nested.
The inner usize
value indicates the position of the opening character
which caused the overflow.
MissingClosingCharacter()
The engine reached end of the document while depth was positive. This means that some of the opening characters do not have matching closing characters.
MalformedLabelQuotes(usize)
An error occurred when trying to parse a label terminated by a particular colon character.
The inner usize
value should be set to the byte index of the colon.
NotSupported(UnsupportedFeatureError)
Engine error that occurred due to a known limitation.