SyntaxError object (Object/core)

A native error object based on the Error object.

Availability:

ECMAScript edition - 3
JavaScript - 1.5
Netscape - 6.0
Inherits from:Error object
JavaScript syntax:NmyError = new SyntaxError()
NmyError = new SyntaxError(aNumber)
NmyError = new SyntaxError(aNumber, aText)
Argument list:aNumberAn error number
aTextA text describing the error

This subclass of the Error object is used when an exception is caused by a script source text parsing error.

See also:catch( ... ), Error object, EvalError object, RangeError object, ReferenceError object, throw, try ... catch ... finally, TypeError object, URIError object

Inheritance chain:

Error object

Cross-references:

ECMA 262 edition 3 - section 15.1.4.13

ECMA 262 edition 3 - section 15.11.6.4