JavaScript Tutorial/MS JScript/Error

Материал из Web эксперт
Перейти к: навигация, поиск

Error

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.

Properties description description Sets or returns the description string. number Sets or returns the number associated with a specific error.

Error.description

Syntax



errorobj.description
    errorobj.description = string


Error.number

Syntax



errorobj.number
    errorobj.number = number;