Improve wasmtime error reporting (#11856)

* Improve `wasmtime` error reporting

* cargo fmt
This commit is contained in:
Koute authored and GitHub committed 2022-07-18 11:51:38 +00:00
1 parent 20abd5dc24
commit 8f6ba2e75e
3 files changed
+17 -16

No files matched your search

@@ -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)?;