[librsvg] IRI: preserve the Href error information
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] IRI: preserve the Href error information
- Date: Tue, 14 Jan 2020 19:49:50 +0000 (UTC)
commit f5d21dee7fd6b8cd05a79b986a368ed6591ea814
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Jan 14 13:46:12 2020 -0600
IRI: preserve the Href error information
rsvg_internals/src/iri.rs | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/rsvg_internals/src/iri.rs b/rsvg_internals/src/iri.rs
index 3478210a..49bc393a 100644
--- a/rsvg_internals/src/iri.rs
+++ b/rsvg_internals/src/iri.rs
@@ -47,9 +47,8 @@ impl Parse for IRI {
let url = parser.expect_url()?;
parser.expect_exhausted()?;
- let href = Href::parse(&url).map_err(|_| {
- loc.new_custom_error(ValueErrorKind::parse_error("could not parse href"))
- })?;
+ let href =
+ Href::parse(&url).map_err(|e| loc.new_custom_error(ValueErrorKind::from(e)))?;
match href {
Href::PlainUrl(_) => Err(loc.new_custom_error(ValueErrorKind::parse_error(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]