[seed] struct - set_property - show warning on failure



commit d308d7d9421acf704fca98d90d0023e336451227
Author: Alan Knowles <alan akbkhome com>
Date:   Tue May 4 12:49:54 2010 +0800

    struct - set_property - show warning on failure
    
    rather than silently ignore failure, show a g_warning message

 libseed/seed-structs.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/libseed/seed-structs.c b/libseed/seed-structs.c
index a443eda..e3dd2d7 100644
--- a/libseed/seed-structs.c
+++ b/libseed/seed-structs.c
@@ -286,6 +286,11 @@ seed_struct_set_property (JSContextRef context,
   seed_gi_make_argument (context, value, field_type, &field_value, exception);
   ret = g_field_info_set_field (field, priv->pointer, &field_value);
 
+  if (!ret) 
+    g_warning("Setting property failed on struct of type: %s  "
+			"with name %s \n",
+			g_base_info_get_name (priv->info), cproperty_name);
+  
   g_base_info_unref ((GIBaseInfo *) field_type);
   g_base_info_unref ((GIBaseInfo *) field);
 



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