[Webkit-unassigned] [Bug 55092] Stack information of uncaught Error object should be available in window.onerror

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 7 13:56:05 PST 2012


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





--- Comment #5 from Timothy Quinn <tim.c.quinn at gmail.com>  2012-02-07 13:56:04 PST ---
(In reply to comment #4)
Wow, I am embarrassed. You are correct that window.onerror in Firefox does not contain the error object in the parameters. I got around this by setting an global variable in my error handlers and then throwing the error up to the window.onerror where I would then retrieve the last error. Sorry for the confusion ( old code ;).

I totally agree that there should be a common ground for all browsers that have a master error handler and that such an error handler receive the last un-handled error as one of its parameters. 

I would wish that the standards organization would also streamline the error object so that it has a system readable and traversable error stack like in Java's StackTraceElement[] return for Throwable::getStackTrace(). This would be a huge win for JavaScript.

I would love to see WebKit be proactive and build such an improved master error handler but IMO, this may not happen unless the ECMA script specification can be updated. I've been meaning to take the time to try and write a detailed justification and specification but I have no free time to do this justice on my own. If anybody is interested in collaborating, I'd be very interested in working together.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list