diff --git a/lib/api/src/js/trap.rs b/lib/api/src/js/trap.rs index 15211c7f750..f104757cd1c 100644 --- a/lib/api/src/js/trap.rs +++ b/lib/api/src/js/trap.rs @@ -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) -> ! { + fn raise(error: Box) -> ! { let error = Self::user(error); let js_error: JsValue = error.into(); wasm_bindgen::throw_val(js_error) diff --git a/lib/compiler/src/engine/trap/error.rs b/lib/compiler/src/engine/trap/error.rs index e2c26c031be..76ae212fb41 100644 --- a/lib/compiler/src/engine/trap/error.rs +++ b/lib/compiler/src/engine/trap/error.rs @@ -3,7 +3,7 @@ use backtrace::Backtrace; use std::error::Error; use std::fmt; use std::sync::Arc; -use wasmer_vm::{raise_user_trap, Trap, TrapCode}; +use wasmer_vm::{Trap, TrapCode}; /// A struct representing an aborted instruction execution, with a message /// indicating the cause. @@ -106,12 +106,6 @@ 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) -> ! { - unsafe { raise_user_trap(error) } - } - /// Creates a custom user Error. /// /// This error object can be passed through Wasm frames and later retrieved