[seed] libseed: Update signal marshaller to use the new machinery for warning about exceptions in closures.



commit 1652795a8f07eb6551b47ae2fe4e486688159fdf
Author: Robert Carr <racarr svn gnome org>
Date:   Mon May 11 18:11:13 2009 -0400

    libseed: Update signal marshaller to use the new machinery for warning about exceptions in closures. Also update test.
---
 libseed/seed-signals.c               |    7 ++-----
 tests/javascript/signal-exception.js |    2 +-
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/libseed/seed-signals.c b/libseed/seed-signals.c
index 5e46155..3865b72 100644
--- a/libseed/seed-signals.c
+++ b/libseed/seed-signals.c
@@ -177,11 +177,8 @@ seed_signal_marshal_func (GClosure * closure,
 
   if (exception)
     {
-      gchar *mes = seed_exception_to_string (ctx,
-					     exception);
-      g_warning ("Exception in signal handler. %s \n", mes);
-      g_free (mes);
-      exception = 0;
+      seed_closure_warn_exception (closure, ctx, exception);
+      exception = NULL;
     }
 
   if (ret && !JSValueIsNull (ctx, ret)
diff --git a/tests/javascript/signal-exception.js b/tests/javascript/signal-exception.js
index 18181bf..1af0217 100755
--- a/tests/javascript/signal-exception.js
+++ b/tests/javascript/signal-exception.js
@@ -2,7 +2,7 @@
 // Returns: 0
 // STDIN:
 // STDOUT:
-// STDERR:\n\*\* \(seed:[0-9]+\): WARNING \*\*: Exception in signal handler. Line 11 in .*\/signal-exception.js: ReferenceError Left side of assignment is not a reference\.
+// STDERR:\n\*\* \(seed:[0-9]+\): WARNING \*\*: Exception in closure .*
 
 Gtk = imports.gi.Gtk;
 Gtk.init(null, null);



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