Function wasm_bindgen::throw_val [−][src]
pub fn throw_val(s: JsValue) -> !
Rethrow a JS exception
This function will throw a JS exception with the JS value provided. This function will not return and the wasm stack will be popped until the point of entry of wasm itself.
Note that it is very easy to leak memory with this function because this
function, unlike panic!
on other platforms, will not run destructors.
It’s recommended to return a Result
where possible to avoid the worry of
leaks.