Skip to main content

JS_ThrowRangeError

Function JS_ThrowRangeError 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn JS_ThrowRangeError( ctx: *mut JsContext, message: *const c_char, ) -> JsValue
Expand description

JS_ThrowRangeError: raise a RangeError with the given message.

The reference’s version is variadic (fmt, ...). Ours reads only fmt, which is correct for every call in the acceptance surface — none of them carry a % conversion. A variadic Rust function is not expressible on stable, and a wrong-arity call would be worse than one that ignores surplus arguments: on x86-64 SysV the surplus ones are simply not read.

§Safety

ctx must be a live context and message a NUL-terminated string.