Remove RuntimeError::raise from public API

This commit is contained in:
Felix Schütt
2022-07-04 16:11:01 +02:00
committed by Manos Pitsidianakis
parent 984df1ed35
commit 220751a035
3 changed files with 3 additions and 8 deletions

View File

@@ -64,7 +64,7 @@ impl RuntimeError {
/// Raises a custom user Error
#[deprecated(since = "2.1.1", note = "return a Result from host functions instead")]
pub fn raise(error: Box<dyn Error + Send + Sync>) -> ! {
pub(crate) fn raise(error: Box<dyn Error + Send + Sync>) -> ! {
let error = Self::user(error);
let js_error: JsValue = error.into();
wasm_bindgen::throw_val(js_error)