napi_is_exception_pending
napi_status napi_is_exception_pending(napi_env env, bool* result); -
[in] env:调用 API 的环境。¥
[in] env: The environment that the API is invoked under. -
[out] result:如果异常挂起,则设置为 true 的布尔值。¥
[out] result: Boolean value that is set to true if an exception is pending.
如果 API 成功,则返回 napi_ok。
¥Returns napi_ok if the API succeeded.
即使存在挂起的 JavaScript 异常,也可以调用此 API。
¥This API can be called even if there is a pending JavaScript exception.