Function mozjs::error::throw_js_error

source ·
unsafe fn throw_js_error(cx: *mut JSContext, error: &str, error_number: u32)
Expand description

Helper fn to throw a javascript error with the given message and number. Reuse the jsapi error codes to distinguish the error_number passed back to the get_error_message callback. c_uint is u32, so this cast is safe, as is casting to/from i32 from there.