[librsvg: 18/51] convolve_matrix.rs: Don't create a NodeError directly
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 18/51] convolve_matrix.rs: Don't create a NodeError directly
- Date: Thu, 19 Dec 2019 01:49:31 +0000 (UTC)
commit 789fea9198c912fb6d6b38a3d3d4fa82f033666c
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Dec 17 10:58:06 2019 -0600
convolve_matrix.rs: Don't create a NodeError directly
rsvg_internals/src/filters/convolve_matrix.rs | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/rsvg_internals/src/filters/convolve_matrix.rs b/rsvg_internals/src/filters/convolve_matrix.rs
index 30163a05..90194f66 100644
--- a/rsvg_internals/src/filters/convolve_matrix.rs
+++ b/rsvg_internals/src/filters/convolve_matrix.rs
@@ -106,7 +106,8 @@ impl NodeTrait for FeConvolveMatrix {
"false" => false,
"true" => true,
_ => {
- return Err(NodeError::parse_error(attr, "expected false or true"));
+ return Err(ValueErrorKind::parse_error("expected false or true"))
+ .attribute(attr);
}
}
}
@@ -357,7 +358,7 @@ impl EdgeMode {
"duplicate" => Ok(EdgeMode::Duplicate),
"wrap" => Ok(EdgeMode::Wrap),
"none" => Ok(EdgeMode::None),
- _ => Err(NodeError::parse_error(attr, "invalid value")),
+ _ => Err(ValueErrorKind::parse_error("invalid value")).attribute(attr),
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]