この記事はまだ日本語に翻訳されていません。MDN の翻訳はボランティアによって行われています。是非 MDN に登録し、私たちの力になって下さい。

Restores the exception state from a JSExceptionState object previously created using JS_SaveExceptionState.


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_THREADSAFE build, the caller must be in a request on this JSContext.
state JSExceptionState * Pointer to the JSExceptionState object to restore exception state from.


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.

MXR ID Search for JS_RestoreStateException

Document Tags and Contributors

Contributors to this page: MMondor, Jorend
最終更新者: Jorend,