Forward the current pending exception in a given
JSContext to the current
bool JS_ReportPendingException(JSContext *cx);
||The context in which the exception was thrown. Requires request. In a
On success, it clears the exception as though by calling
JS_ClearPendingException and returns
true. If no exception is pending, or if a second error occurs while trying to report the first one, it returns
This function can be used to catch exceptions thrown from scripts and send them to the error reporter to be logged or ignored. Note that certain JSAPI functions automatically do this for uncaught exceptions; see "Automatic handling of uncaught exceptions" in the JSAPI User Guide.