summaryrefslogtreecommitdiff
path: root/json-glib/json-gobject.c
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.van.berkom@gmail.com>2011-07-13 15:27:07 -0400
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2011-07-13 15:27:07 -0400
commit996d89911d71f54f9a476242f1bd43c077d4428c (patch)
treee96fa81ea24002379c5000327a3a0d2c0bc31438 /json-glib/json-gobject.c
parent4315308a19e4cf474451cecf8b69aceddda91f49 (diff)
downloadjson-glib-996d89911d71f54f9a476242f1bd43c077d4428c.tar.gz
Added an additional warning to json_gobject_new()
The same warning that is fired when failing to deserialize properties normally needed to be added for the case that we fail to deserialize construct-only properties.
Diffstat (limited to 'json-glib/json-gobject.c')
-rw-r--r--json-glib/json-gobject.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/json-glib/json-gobject.c b/json-glib/json-gobject.c
index 0b91a5e..68d0d95 100644
--- a/json-glib/json-gobject.c
+++ b/json-glib/json-gobject.c
@@ -232,7 +232,12 @@ json_gobject_new (GType gtype,
val = json_object_get_member (object, member_name);
res = json_deserialize_pspec (&param.value, pspec, val);
if (!res)
- g_value_unset (&param.value);
+ {
+ g_warning ("Failed to deserialize \"%s\" property of type \"%s\" for an object of type \"%s\"",
+ pspec->name, G_VALUE_TYPE_NAME (&param.value), g_type_name (gtype));
+
+ g_value_unset (&param.value);
+ }
else
{
param.name = g_strdup (pspec->name);