Error: a generic exception — ECMAScript v3: Object → Error
new Error( )
An optional error message that provides details about the exception.
A newly constructed Error object. If the
message argument is specified, the
Error object uses it as the value of its
message property; otherwise, it uses an
implementation-defined default string as the value of that
property. When the
constructor is called as a function, without the
new operator, it behaves just as it does
when called with the
An error message that provides details about the exception. This property holds the string passed to the constructor or an implementation-defined default string.
A string that specifies the type of the exception. For instances of the Error class and all of its subclasses, this property specifies the name of the constructor used to create the instance.
Returns an implementation-defined string that represents this Error object.
Instances of the Error class represent errors or exceptions
and are typically used with the
try/catch statements. The
name property specifies the type of the
exception, and the
property can provide human-readable details about the