Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

JS_ErrorFromException

This article needs a technical review. How you can help.

Get or create JSErrorReport from an exception object.

Syntax

JSErrorReport *
JS_ErrorFromException(JSContext *cx, JS::HandleObject obj);
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.
obj JS::HandleObject An exception object.

Description

If obj is an exception object, the exception will have (or be able to lazily create) an error report struct, and JS_ErrorFromException will return the address of that struct. Otherwise, it returns nullptr. The lifetime of the error report struct that might be returned is the same as the lifetime of the exception object.

See Also

Document Tags and Contributors

 Contributors to this page: kscarfone, arai
 Last updated by: kscarfone,