[json-glib] Warn from json_gobject_deserialize() if a listed property cannot be deserialized.



commit 9824a32a803bd194208d460068ce5ba91d776686
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Sat Apr 23 18:15:37 2011 +0900

    Warn from json_gobject_deserialize() if a listed property cannot be deserialized.

 json-glib/json-gobject.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/json-glib/json-gobject.c b/json-glib/json-gobject.c
index 5742188..dfa4058 100644
--- a/json-glib/json-gobject.c
+++ b/json-glib/json-gobject.c
@@ -324,6 +324,9 @@ json_gobject_new (GType       gtype,
                      g_type_name (G_VALUE_TYPE (&value)));
           g_object_set_property (retval, pspec->name, &value);
         }
+      else
+	g_warning ("Failed to deserialize \"%s\" property of type \"%s\" for an object of type \"%s\"",
+		   pspec->name, g_type_name (G_VALUE_TYPE (&value)), g_type_name (gtype));
 
       g_value_unset (&value);
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]