Skip to main content

JS_ErrorFromException

Function JS_ErrorFromException 

Source
pub unsafe extern "C" fn JS_ErrorFromException(
    cx: *mut JSContext,
    obj: Handle<*mut JSObject>,
    errorReport: *mut BorrowedErrorReport,
) -> bool
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 populate |errorReport| with it and return true. Otherwise, returns false.

See |BorrowedErrorReport| for a usage example.