Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
new Error( )
new Error(message)
message
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 Error( ) constructor is called as a function, without the new operator, it behaves just as it does when called with the new operator.