From 6a2c7e01a6975cc07b20827dfb6ba5c7b249376c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Mon, 4 Jul 2022 15:40:56 +0200 Subject: [PATCH] Remove RuntimeError::raise from public API --- lib/api/src/js/trap.rs | 2 +- lib/compiler/src/engine/trap/error.rs | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) 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