Restores the exception state from a JSExceptionState object previously created using JS_SaveExceptionState.
Syntax
void JS_RestoreExceptionState(JSContext *cx, JSExceptionState *state);
| Name | Type | Description | 
|---|---|---|
| cx | JSContext * | Pointer to a JS context from which to derive runtime information. Requires request. In a JS_THREADSAFEbuild, the caller must be in a request on thisJSContext. | 
| state | JSExceptionState * | Pointer to the JSExceptionStateobject to restore exception state from. | 
Description
This function permits to restore any previously saved exception state which was saved into a JSExceptionState object created by the JS_SaveExceptionState function.
If any exception was pending when JS_SaveExceptionState was called, the same exception will be set to pend for the current context. If no exceptions were pending when calling JS_SaveExceptionState, any pending exception for the context will likewise be cleared.