[gxml] Adding debuging information messages
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml] Adding debuging information messages
- Date: Wed, 21 Oct 2015 21:44:48 +0000 (UTC)
commit 250ac402511e46bed12648daa8907be38de976a2
Author: Daniel Espinosa <esodan gmail com>
Date: Wed Oct 21 11:29:40 2015 -0500
Adding debuging information messages
gxml/SerializableObjectModel.vala | 6 ++++++
gxml/SerializableProperty.vala | 7 ++++++-
gxml/SerializableValueList.vala | 12 ++++++++++++
3 files changed, 24 insertions(+), 1 deletions(-)
---
diff --git a/gxml/SerializableObjectModel.vala b/gxml/SerializableObjectModel.vala
index 7ba4992..7c9d26a 100644
--- a/gxml/SerializableObjectModel.vala
+++ b/gxml/SerializableObjectModel.vala
@@ -392,8 +392,14 @@ public abstract class GXml.SerializableObjectModel : Object, Serializable
#endif
}
}
+#if DEBUG
+ GLib.message (@"Finishing deserialize unknown node $(property_node.name) to $(get_type ().name
()): Size=$(unknown_serializable_nodes.size.to_string ())");
+#endif
return true;
}
+#if DEBUG
+ GLib.message (@"Checking if $(property_node.name) of type $(prop.value_type.name ()) is
Serializable");
+#endif
if (prop.value_type.is_a (typeof (Serializable)))
{
#if DEBUG
diff --git a/gxml/SerializableProperty.vala b/gxml/SerializableProperty.vala
index 84e6695..8a5a074 100644
--- a/gxml/SerializableProperty.vala
+++ b/gxml/SerializableProperty.vala
@@ -106,7 +106,12 @@ public interface GXml.SerializableProperty : Object, Serializable
attr = (GXml.Attribute) property_node;
if (property_node is GXml.Element)
attr = (GXml.Attribute) ((GXml.Element) property_node).attrs.get (get_serializable_property_name ());
- if (attr == null) return false;
+ if (attr == null) {
+#if DEBUG
+ GLib.warning ("No attribute found to deserialize from");
+#endif
+ return false;
+ }
if (get_serializable_property_name () == null) {
GLib.warning ("Property name is not set for type: "+this.get_type ().name ());
return false;
diff --git a/gxml/SerializableValueList.vala b/gxml/SerializableValueList.vala
index 5d988d3..76dbbfc 100644
--- a/gxml/SerializableValueList.vala
+++ b/gxml/SerializableValueList.vala
@@ -114,23 +114,35 @@ public class GXml.SerializableValueList : SerializableObjectModel, SerializableP
public void set_serializable_property_name (string name) { _name = name; }
public override GXml.Node? serialize (GXml.Node node) throws GLib.Error
{
+#if DEBUG
+ GLib.message ("Serializing SerializableProperty: "+get_type ().name ());
+#endif
return default_serializable_property_serialize (node);
}
public override GXml.Node? serialize_property (GXml.Node element,
GLib.ParamSpec prop)
throws GLib.Error
{
+#if DEBUG
+ GLib.message ("Serializing on property - SerializableProperty: "+get_type ().name ());
+#endif
return default_serializable_property_serialize_property (element, prop);
}
public override GXml.Node? deserialize (GXml.Node node)
throws GLib.Error
{
+#if DEBUG
+ GLib.message ("Deserializing SerializableProperty: "+get_type ().name ());
+#endif
default_serializable_property_deserialize_property (node);
return node;
}
public override bool deserialize_property (GXml.Node property_node)
throws GLib.Error
{
+#if DEBUG
+ GLib.message ("Deserializing on property - SerializableProperty: "+get_type ().name ());
+#endif
default_serializable_property_deserialize_property (property_node);
return true;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]