diff options
author | 2025-04-12 11:56:21 +0100 | |
---|---|---|
committer | 2025-04-12 11:56:21 +0100 | |
commit | c658ab440f8e69ac406b18732dbf276c084926b6 (patch) | |
tree | f033b38c6a16c6a900eb37f56ad9ae6f362cb435 /src/xml | |
parent | 3d575ec2a4440e7e4597761eab907d63ef91175e (diff) | |
download | peanuts-c658ab440f8e69ac406b18732dbf276c084926b6.tar.gz peanuts-c658ab440f8e69ac406b18732dbf276c084926b6.tar.bz2 peanuts-c658ab440f8e69ac406b18732dbf276c084926b6.zip |
feat: include input in parse error
Diffstat (limited to '')
-rw-r--r-- | src/xml/parsers_complete.rs | 7 |
1 files changed, 6 insertions, 1 deletions
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(), + )) + } } } } |