diff options
author | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2011-07-13 15:27:07 -0400 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2011-07-13 15:27:07 -0400 |
commit | 996d89911d71f54f9a476242f1bd43c077d4428c (patch) | |
tree | e96fa81ea24002379c5000327a3a0d2c0bc31438 /json-glib/json-gobject.c | |
parent | 4315308a19e4cf474451cecf8b69aceddda91f49 (diff) | |
download | json-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.c | 7 |
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 (¶m.value, pspec, val); if (!res) - g_value_unset (¶m.value); + { + g_warning ("Failed to deserialize \"%s\" property of type \"%s\" for an object of type \"%s\"", + pspec->name, G_VALUE_TYPE_NAME (¶m.value), g_type_name (gtype)); + + g_value_unset (¶m.value); + } else { param.name = g_strdup (pspec->name); |