1
0
mirror of https://github.com/fluencelabs/wasmer synced 2025-07-20 01:51:54 +00:00

Make runtime and trap errors well defined (WIP)

This commit is contained in:
Mark McCaskey
2020-04-23 12:40:35 -07:00
parent ab106af422
commit bfb6814f23
6 changed files with 125 additions and 35 deletions
lib

@@ -1,5 +1,5 @@
use crate::{
error::CompileResult,
error::{CompileResult, RuntimeError},
module::ModuleInner,
state::ModuleStateMap,
typed_func::Wasm,
@@ -282,7 +282,7 @@ pub trait RunnableModule: Send + Sync {
fn get_trampoline(&self, info: &ModuleInfo, sig_index: SigIndex) -> Option<Wasm>;
/// Trap an error.
unsafe fn do_early_trap(&self, data: Box<dyn Any + Send>) -> !;
unsafe fn do_early_trap(&self, data: RuntimeError) -> !;
/// Returns the machine code associated with this module.
fn get_code(&self) -> Option<&[u8]> {