Should Error#message be enumerable?
Mathias Bynens
mathias at qiwi.be
Sun Sep 4 23:53:52 PDT 2011
In most environments, Error#message is enumerable, e.g.
try {
LOLWAT; // throws a ReferenceError
} catch(e) {
for (var i in e) {
console.log(i);
}
}
This enumerates the properties on the Error object and logs them one
by one to the console.
This behavior recently changed in v8, causing me to file this bug:
http://code.google.com/p/v8/issues/detail?id=1595 However, the
comments (starting at
http://code.google.com/p/v8/issues/detail?id=1595#c5) have confused
me.
Could anyone please clarify what the spec says on this topic?
More information about the es-discuss
mailing list