[gjs] modules/console: Bring back fancy error reporter



commit 1884a523f6c20b6cbee0b37dde31841a582e20ef
Author: Philip Chimento <philip chimento gmail com>
Date:   Fri Apr 28 00:07:16 2017 -0700

    modules/console: Bring back fancy error reporter
    
    At some point we lost our custom error reporter from gjs-console. It
    doesn't compile with SpiderMonkey 45 and so will have to be changed, but
    I noticed it was never being called. Instead of removing it, let's
    restore it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=781882

 modules/console.cpp |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/modules/console.cpp b/modules/console.cpp
index 8fd3fd4..00db76f 100644
--- a/modules/console.cpp
+++ b/modules/console.cpp
@@ -214,8 +214,9 @@ gjs_console_interact(JSContext *context,
         gjs_schedule_gc_if_needed(context);
 
         if (JS_GetPendingException(context, &result)) {
-            str = JS::ToString(context, result);
-            JS_ClearPendingException(context);
+            if (!JS_ReportPendingException(context))
+                return false;
+            goto next;
         } else if (result.isUndefined()) {
             goto next;
         } else {


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