From c658ab440f8e69ac406b18732dbf276c084926b6 Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Sat, 12 Apr 2025 11:56:21 +0100 Subject: feat: include input in parse error --- src/xml/parsers_complete.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/xml') diff --git a/src/xml/parsers_complete.rs b/src/xml/parsers_complete.rs index f18d0ff..1e2ac31 100644 --- a/src/xml/parsers_complete.rs +++ b/src/xml/parsers_complete.rs @@ -40,7 +40,12 @@ pub trait Parser<'s> { return Err(crate::error::Error::ExtraData(rest.to_string())); } } - Result::Err(e) => return Err(crate::error::Error::ParseError(e.to_string())), + Result::Err(e) => { + return Err(crate::error::Error::ParseError( + input.to_string(), + e.to_string(), + )) + } } } } -- cgit