JS_GetErrorPrototype

This is an archived page. It's not actively maintained.

This article covers features introduced in SpiderMonkey 38

Return the original value of Error.prototype.

Syntax

JSObject *
JS_GetErrorPrototype(JSContext *cx);
Name Type Description
cx JSContext * Pointer to a JS context whose errors should be reported via your function. Other contexts in the same runtime can have their own error reporting functions.

Description

JS_GetErrorPrototype returns the original value of Error.prototype from the global object of the current compartment of cx.

See Also