JavaScripture
Contribute Feedback

JavaScript Error : Object

An object thrown when an error occurs. There are several specific constructor functions for different types of error conditions: EvalError, RangeError, ReferenceError, SyntaxError, TypeError, URIError, NativeError.

Error(message : String) : Error

Creates a new Error with the specified message that describes the error.

Example:

Run

Results:

 

Constructors

new Error(message : String) : Error

Same as Error(message)

Instance Properties

message : String

The message passed to the constructor.

Example:

Run

Results:

 
name : String

The type of error.

Example:

Run

Results: