[epiphany/mcatanzaro/passwords: 5/15] web-extension: Print better JS error messages
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/passwords: 5/15] web-extension: Print better JS error messages
- Date: Mon, 4 Mar 2019 00:51:46 +0000 (UTC)
commit 6054b3c67c1b856f23892a368171d762a630d1db
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Sun Mar 3 15:49:33 2019 -0600
web-extension: Print better JS error messages
The message alone is not enough detail to debug JS errors.
embed/web-extension/ephy-web-extension.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/embed/web-extension/ephy-web-extension.c b/embed/web-extension/ephy-web-extension.c
index 6c7e5d494..645afa7ff 100644
--- a/embed/web-extension/ephy-web-extension.c
+++ b/embed/web-extension/ephy-web-extension.c
@@ -640,11 +640,12 @@ js_exception_handler (JSCContext *context,
{
g_autoptr(JSCValue) js_console = NULL;
g_autoptr(JSCValue) js_result = NULL;
+ g_autofree char *report = NULL;
js_console = jsc_context_get_value (context, "console");
js_result = jsc_value_object_invoke_method (js_console, "error", JSC_TYPE_EXCEPTION, exception,
G_TYPE_NONE);
-
- g_warning ("JavaScriptException: %s", jsc_exception_get_message (exception));
+ report = jsc_exception_report (exception);
+ g_warning ("%s", report);
jsc_context_throw_exception (context, exception);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]