Status: New
Owner: ----
New issue 1595 by [email protected]: Error#message should be enumerable
http://code.google.com/p/v8/issues/detail?id=1595
Originally posted here: http://code.google.com/p/v8/issues/detail?id=92340
But it’s probably a v8 bug rather than a Chromium bug. Sorry!
Chrome Version : 15.0.847.0 canary
URLs (if applicable) : http://jsperf.com/benchmark-js-test-page
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
Safari 5: OK
Firefox 4.x: OK
IE 7/8/9: OK
What steps will reproduce the problem?
1.
try {
LOLWAT; // throws a ReferenceError
} catch(e) {
for (var i in e) {
console.log(i);
}
}
What is the expected result?
It should enumerate the properties on the Error object and log them one by
one to the console.
What happens instead?
The properties on the Error object aren’t enumerated. Nothing is logged to
the console.
Please provide any additional information below. Attach a screenshot if
possible.
We use this on jsPerf to display helpful error messages. For an example, go
to http://jsperf.com/benchmark-js-test-page and click the <th> that says
“Error”
Note that this works fine in the latest stable Chrome (12) and in every
other browser.
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev