Skip to content

Commit f14e56d

Browse files
committed
fix(runtime): stringify host callback errors
1 parent 71746f9 commit f14e56d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

runtime/src/plugin.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,8 @@ fn relink(
338338
stringify!($name),
339339
t,
340340
|caller, params, results| {
341-
pdk::$name(caller, params, results).map_err(wasmtime::Error::from)
341+
pdk::$name(caller, params, results)
342+
.map_err(|err| wasmtime::Error::msg(err.to_string()))
342343
},
343344
)?;
344345
)*
@@ -409,7 +410,7 @@ fn relink(
409410
let ns = f.namespace().unwrap_or(EXTISM_USER_MODULE);
410411
let func = f.f.clone();
411412
linker.func_new(ns, name, f.ty(engine).clone(), move |caller, params, results| {
412-
func(caller, params, results).map_err(wasmtime::Error::from)
413+
func(caller, params, results).map_err(|err| wasmtime::Error::msg(err.to_string()))
413414
})?;
414415
}
415416

0 commit comments

Comments
 (0)