MS JScript JavaScript Tutorial

Syntax

var variable = new Error();
    var variable = new Error(num);
    var variable = new Error(num, description);
The Error object contains information about errors.
description -- A string that describes the error.
Propertiesdescription
descriptionSets or returns the description string.
numberSets or returns the number associated with a specific error.
An error number is a 32-bit value where the upper 16-bit word is the facility code and the lower word is the actual error code.

var myError = Error(35,"My Error");