Error instances have no special properties?

Garrett Smith dhtmlkitchen at gmail.com
Wed Apr 28 00:53:00 PDT 2010


Why does the specification state "Error instances have no special properties"?

The ES5 specification states:

| 15.11.5 Properties of Error Instances
| Error instances inherit properties from the Error prototype
| object and their [[Class]] internal property value is
| "Error". Error instances have no special properties.

However error instances do have an own property: message. The value
obviously is not shared in the prototype (that would be a mistake).

javascript: alert(new Error("foo").hasOwnProperty("message"));

true

Garrett


More information about the es-discuss mailing list