[json-glib/json-glib-0-12] Warn from json_gobject_deserialize() if a listed property cannot be deserialized. (cherry picked fro



commit 3d565abff70ec835b1bcaa7e970a27d18dca8ebb
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.
    (cherry picked from commit 9824a32a803bd194208d460068ce5ba91d776686)
    
    Signed-off-by: Emmanuele Bassi <ebassi gnome org>

 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]