Improve wasmtime error reporting (#11856)

* Improve `wasmtime` error reporting

* cargo fmt
This commit is contained in:
Koute
2022-07-18 20:51:38 +09:00
committed by GitHub
parent 20abd5dc24
commit 8f6ba2e75e
3 changed files with 17 additions and 16 deletions
@@ -112,7 +112,7 @@ impl<'a, 'b> sp_wasm_interface::HostFunctionRegistry for Registry<'a, 'b> {
if self.pending_func_imports.remove(fn_name).is_some() {
self.linker.func_wrap("env", fn_name, func).map_err(|error| {
WasmError::Other(format!(
"failed to register host function '{}' with the WASM linker: {}",
"failed to register host function '{}' with the WASM linker: {:#}",
fn_name, error
))
})?;