Core JavaScript 1.5 Reference:Global Objects:Error:prototype
From MDC
Contents |
[edit] Summary
Represents the prototype for the Error constructor.
[edit] Description
All Error instances and instances of non-generic errors inherit from Error.prototype. As with all constructor functions, you can use the prototype of the constructor to add properties or methods to all instances created with that constructor.
[edit] Properties
[edit] Standard properties
- constructor
- Specifies the function that created an instance's prototype.
- message
- Error message.
- name
- Error name.
[edit] Vendor-specific extensions
Non-standard
[edit] Microsoft
- description
- Error description. Similar to message.
- number
- Error number.
[edit] Mozilla
- fileName
- Path to file that raised this error.
- lineNumber
- Line number in file that raised this error.
- stack
- Stack trace.
[edit] Methods
- toSource
- Non-standard
- Returns a string containing the source of the specified
Errorobject; you can use this value to create a new object. Overrides the Object.toSource method.
- toString
- Returns a string representing the specified object. Overrides the Object.toString method.
Methods inherited from Object.prototype
__defineGetter__, __defineSetter__, hasOwnProperty, isPrototypeOf, __lookupGetter__, __lookupSetter__, __noSuchMethod__, propertyIsEnumerable, unwatch, valueOf, watch