Function mozjs_sys::jsapi::JS_ErrorFromException

source ยท
pub unsafe extern "C" fn JS_ErrorFromException(
    cx: *mut JSContext,
    obj: HandleObject,
) -> *mut JSErrorReport
Expand description

If the given object is an exception object, the exception will have (or be able to lazily create) an error report struct, and this function will return the address of that struct. Otherwise, it returns nullptr. The lifetime of the error report struct that might be returned is the same as the lifetime of the exception object.