Skip to main content

JS_ThrowSyntaxError

Function JS_ThrowSyntaxError 

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

JS_ThrowSyntaxError, JS_ThrowTypeError, JS_ThrowReferenceError, JS_ThrowInternalError: the four JS_Throw* spellings not already exported.

Each one is variadic in the header. Ours reads only fmt, for the reason JS_ThrowRangeError documents: a variadic Rust function is not expressible on stable, and a wrong-arity call would be worse than one that ignores surplus arguments.

ยงSafety

ctx must be a live context, fmt null or NUL-terminated.