Should Error#message be enumerable?

# Mathias Bynens (14 years ago)

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: code.google.com/p/v8/issues/detail?id=1595 However, the comments (starting at code.google.com/p/v8/issues/detail?id=1595#c5) have confused me.

Could anyone please clarify what the spec says on this topic?