[Webkit-unassigned] [Bug 161187] [GTK] Provide details on javascript exception

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 22 23:11:06 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=161187

--- Comment #4 from Carlos Garcia Campos <cgarcia at igalia.com> ---
Comment on attachment 310896
  --> https://bugs.webkit.org/attachment.cgi?id=310896
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=310896&action=review

Thanks for the patch.

> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:3139
> -            _("An exception was raised in JavaScript"));
> +            _("An exception was raised in JavaScript: %s"), exceptionDetails.message.utf8().data());

Now that we have the error details, I think the prefix "An exception was raised in JavaScript" is kind of redundant, we know that from the error code WEBKIT_JAVASCRIPT_ERROR_SCRIPT_FAILED. I think we can use all the details to build a complete error message, consistent with messages shown by the inspector or stdout when setting enable-write-console-messages-to-stdout is enabled. If we have a url, then we add url with line and column, and then error message, if we don't have a url we just show the error message. You can see how the message is built in Source/JavaScriptCore/runtime/ConsoleClient.cpp

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170523/528ce520/attachment.html>


More information about the webkit-unassigned mailing list