JavaScripture
Contribute via GitHub 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

Constructors

new Error(message : String) : Error

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

Example:

Run

Results:

 

Instance Properties

message : String

A human readable message that describes the error.

Example:

Run

Results:

 

name : String

The type of error.

Example:

Run

Results: