[libpeas] Check for an exception after calling a function in GJS plugins



commit e040e650b2c359b429b800b1cc2ab6186e7ede8b
Author: Garrett Regier <garrettregier gmail com>
Date:   Wed Mar 21 17:16:40 2012 -0700

    Check for an exception after calling a function in GJS plugins

 loaders/gjs/peas-extension-gjs.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/loaders/gjs/peas-extension-gjs.c b/loaders/gjs/peas-extension-gjs.c
index 32cd00e..a813f38 100644
--- a/loaders/gjs/peas-extension-gjs.c
+++ b/loaders/gjs/peas-extension-gjs.c
@@ -283,8 +283,12 @@ peas_extension_gjs_call (PeasExtensionWrapper *exten,
 
   if (!success)
     {
-      g_warning ("Error while calling '%s.%s'",
-                 g_type_name (exten_type), method_name);
+      if (!gjs_log_exception (gexten->js_context, NULL))
+        {
+          g_warning ("Error while calling '%s.%s'",
+                     g_type_name (exten_type), method_name);
+        }
+
       return FALSE;
     }
 



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