[seed] Update closure exception warning to make use of description field



commit d920decdb335095cc9a5073df03f60c3253a8276
Author: Robert Carr <racarr svn gnome org>
Date:   Mon May 11 18:02:54 2009 -0400

    Update closure exception warning to make use of description field
---
 libseed/seed-closure.c |    2 +-
 modules/dbus/module.c  |    3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/libseed/seed-closure.c b/libseed/seed-closure.c
index ee7532f..0941140 100644
--- a/libseed/seed-closure.c
+++ b/libseed/seed-closure.c
@@ -408,7 +408,7 @@ seed_closure_warn_exception (GClosure *c,
 				      NULL);
   gchar *mes = seed_exception_to_string (ctx, exception);
 
-  g_warning("Exception in closure (%p %s). %s", c, name, mes);
+  g_warning("Exception in closure (%p) for %s (handler %s). %s", c, ((SeedClosure *)c)->description, *name == '\0' ? "[anonymous]" : name, mes);
   
   g_free (name);
   g_free (mes);   
diff --git a/modules/dbus/module.c b/modules/dbus/module.c
index 02e5a7e..38c1dfb 100644
--- a/modules/dbus/module.c
+++ b/modules/dbus/module.c
@@ -265,9 +265,8 @@ pending_notify (DBusPendingCall * pending, void *user_data)
 
   if (exception)
 	  argv[1] = exception;
-  exception = NULL;
   seed_closure_invoke_with_context (ctx, closure, &argv[0], 2, &exception);
-  if (exception)
+  if (exception && seed_value_is_object (ctx, exception))
     seed_closure_warn_exception(closure, ctx, exception);
   seed_context_unref (ctx);
   // TODO: Do something with exception



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