[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
Wed Feb 23 23:18:13 PST 2011


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


Garrett Smith <dhtmlkitchen at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dhtmlkitchen at gmail.com




--- Comment #1 from Garrett Smith <dhtmlkitchen at gmail.com>  2011-02-23 23:18:13 PST ---
I believe this bug may be INVALID.

`new Error().stack` shouldn't have anything other than itself in its stack. What else would that new Error possibly have on it?

I'm pretty sure that what was called a problem is not a problem at all. 

Perhaps what you want to do is find what caused onerror to fire, yeah? Perhaps you want error handler that takes the thrown error as a parameter.

function handler(errorEvent) {
  alert(errorEvent.stack);
}


window.addEventListener("scripterror", handler, false);
// OR:
// window.onscripterror = handler;

asdf4++; // cause an error.

And when that error is thrown, then the browser fires a scripterror at the window and a scripterror is just an error so it has the stack, type, message, etc. Post to WHATWG, this is OT. 

Is this bug INVALID?

-- 
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