JS RestoreExceptionState
From MDC
Restores the exception state from a JSExceptionState object previously created using JS_SaveExceptionState.
[edit] 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 |
state |
JSExceptionState * |
Pointer to the JSExceptionState object to restore exception state from. |
[edit] 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.