JS IsExceptionPending
From MDC
Determine whether an exception is pending in the JS engine.
[edit] Syntax
JSBool JS_IsExceptionPending(JSContext *cx);
| Name | Type | Description |
|---|---|---|
cx |
JSContext * |
Pointer to a JS context to check for pending exceptions. |
[edit] Description
JS_IsExceptionPending returns JS_TRUE if an exception has been thrown in the context cx and the exception has not yet been caught or cleared. Otherwise, it returns JS_FALSE
This can be used from JSNative functions which call JS code to determine if the called JS code threw an exception or not.
[edit] See Also
LXR ID Search for JS_IsExceptionPending
JS_SetPendingException, JS_GetPendingException, JS_ClearPendingException, JS_ReportPendingException