These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:17 pm Advanced search

Call stack for onerror event

Do you think the HTML spec should do something differently? You can discuss spec feedback here, but you should send it to the WHATWG mailing list or file a bug in the W3C bugzilla for it to be considered.

Call stack for onerror event

Postby Flintstone » Wed Dec 31, 2008 1:32 am

I have been attempting, like many others, to implement reasonable server side logging of JS errors and have managed to log a lot of information with one vital element missing ... the call stack at the time the error was triggered.

Inside of onerror handlers the call stack can only be obtained using try/catch() and triggering an error. Unfortunately the call stack then only goes back as far as the onerror event, which is useless.

It would be hugely useful if the complete call stack (from the time the event was triggered) was available from within the onerror handler.

I know that the onerror event is proprietary but are there any plans to add it to HTML5? If so, will the stack trace be made available?
Flintstone
<h6>
 
Posts: 2
Joined: Wed Dec 31, 2008 1:12 am
Location: Switzerland

Postby zcorpan » Mon Jan 05, 2009 7:07 am

zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden

Postby Flintstone » Mon Jan 05, 2009 8:51 am

I see, I will take the issue up with the ecmascript guys then.

Thanks for the info zcorpan.
Flintstone
<h6>
 
Posts: 2
Joined: Wed Dec 31, 2008 1:12 am
Location: Switzerland


Return to Feedback on the Specs

Who is online

Users browsing this forum: No registered users and 0 guests