Good day,
I have been reviewing the status of WebKit and their implementation of window.onerror. They implemented it recently after several years in the queue. The unfortunate thing about their implementation is that it does not give access to any way of getting the full error stack. Both IE and Mozilla have had capabilities to get the call stack (albeit not standard or similar).
The issue with WebKit is that they are following the WhatWG specification exactly for 7.1.3.5 Runtime script errors. This specification does not give any reference to access the error object or stack information.
Having the full error stack is immensely helpful when debugging large and complex javascript applications and having this in FireFox with the level of detail they have (JS Source URL, Function and Line Number), is the cats meow. IE is just barely usable offering the ability to use arguments.callee.caller call stack crawling. I have built extremely complex JS Application for many years based around the master error handler capabilities of window.onerror.
My question is, what is the possibility of having the specification for 7.1.3.5 Runtime script errors updated to include a fourth parameter for the error object which was thrown.
Having the error object at the error handler is first common sense from a cross language perspective and it gives access to the object that "should" contain access to the stack and finally gives access to the error class, error message, throw stack access (errPrevious = error.getCause();).
I would be glad to make a detailed business case for this change but I have no idea on what the next steps would be to get this done.
Thanks for your time,
- Timothy (Jsd) Quinn