diff options
Diffstat (limited to 'src/reader/error.rs')
-rw-r--r-- | src/reader/error.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/reader/error.rs b/src/reader/error.rs index 8af35ae..64210c4 100644 --- a/src/reader/error.rs +++ b/src/reader/error.rs @@ -65,6 +65,8 @@ pub(crate) enum SyntaxError { UnexpectedXmlVersion(Box<str>), ConflictingEncoding(Encoding, Encoding), UnexpectedTokenBefore(&'static str, char), + /// Document has more stuff than `ParserConfig` allows + ExceededConfiguredLimit, } impl fmt::Display for SyntaxError { @@ -116,6 +118,7 @@ impl SyntaxError { Self::UnexpectedXmlVersion(ref version) => format!("Invalid XML version: {version}").into(), Self::UnknownMarkupDeclaration(ref v) => format!("Unknown markup declaration: {v}").into(), Self::UnsupportedEncoding(ref v) => format!("Unsupported encoding: {v}").into(), + Self::ExceededConfiguredLimit => "This document is larger/more complex than allowed by the parser's configuration".into(), } } } |