Error
JScript5.0+Syntax
var variable = new Error(); var variable = new Error(num); var variable = new Error(num, description);
Description
The Error object contains information about errors. The Error() constructors can be used to create custom errors. The arguments and properties associated with the Error object are listed in Table 9.8.
Type | Item | Description |
---|---|---|
Arguments | number | A number assigned to an error—Zero, if no number is provided in constructor. |
description | A string that describes the error—empty string, if no string is provided in constructor. | |
Properties | description | Sets or returns the description string associated with a specific error. |
number | Sets or returns the number associated ... |
Get Pure JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.