[librsvg: 1/3] NodePath: Log when path commands cannot be parsed
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 1/3] NodePath: Log when path commands cannot be parsed
- Date: Mon, 5 Nov 2018 19:27:25 +0000 (UTC)
commit 6e4cad6521d150242076b085d47b97abd3ca4965
Author: Federico Mena Quintero <federico gnome org>
Date: Mon Nov 5 11:19:42 2018 -0600
NodePath: Log when path commands cannot be parsed
rsvg_internals/src/shapes.rs | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/rsvg_internals/src/shapes.rs b/rsvg_internals/src/shapes.rs
index 6cf395a3..94763542 100644
--- a/rsvg_internals/src/shapes.rs
+++ b/rsvg_internals/src/shapes.rs
@@ -123,14 +123,25 @@ impl NodePath {
}
impl NodeTrait for NodePath {
- fn set_atts(&self, _: &RsvgNode, _: *const RsvgHandle, pbag: &PropertyBag<'_>) -> NodeResult {
+ fn set_atts(
+ &self,
+ node: &RsvgNode,
+ _: *const RsvgHandle,
+ pbag: &PropertyBag<'_>,
+ ) -> NodeResult {
for (_key, attr, value) in pbag.iter() {
if attr == Attribute::D {
let mut builder = PathBuilder::new();
- if path_parser::parse_path_into_builder(value, &mut builder).is_err() {
+ if let Err(e) = path_parser::parse_path_into_builder(value, &mut builder) {
// FIXME: we don't propagate errors upstream, but creating a partial
// path is OK per the spec
+
+ rsvg_log!(
+ "could not parse path {}: {}",
+ node.get_human_readable_name(),
+ e
+ );
}
*self.builder.borrow_mut() = Some(builder);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]