catch( ... ) (Function)

Part of the try ... catch ...finally error-handling mechanism.

Availability:

ECMAScript edition - 3
JavaScript - 1.5
JScript - 5.0
Internet Explorer - 5.0
Netscape - 6.0
JavaScript syntax:-catch(anError)
Argument list:anErrorAn instance of the error object

The ECMAScript standard (edition 2) defined the catch keyword and reserves it for future use. Edition 3 mandates that this should now be supported in a compliant interpreter.

In anticipation of that, it is available in JavaScript version 1.4. This is also now supported in JScript version 5.0 as well.

Refer to the try ... catch ... finally topic for more details.

See also:Error object, EvalError object, Exception handling, finally ..., RangeError object, ReferenceError object, SyntaxError object, throw, try ... catch ... finally, TypeError object, URIError object

Cross-references:

ECMA 262 edition 2 - section - 7.4.3

ECMA 262 edition 3 - section - 7.5.2

ECMA 262 edition 3 - section - 12.14