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
@@ -186,9 +186,10 @@ impl InstanceWrapper {
) -> Result<Self> {
let mut store = create_store(engine, max_memory_size);
let instance = instance_pre.instantiate(&mut store).map_err(|error| {
WasmError::Other(
format!("failed to instantiate a new WASM module instance: {}", error,),
)
WasmError::Other(format!(
"failed to instantiate a new WASM module instance: {:#}",
error,
))
})?;
let memory = get_linear_memory(&instance, &mut store)?;