wiggle: make the dummy executor return a trap rather than panic

when configured improperly
This commit is contained in:
Pat Hickey
2021-07-15 11:44:58 -07:00
parent f3b80ece5f
commit 6f07c76c84
2 changed files with 5 additions and 6 deletions

View File

@@ -149,7 +149,7 @@ fn generate_func(
#field_str,
move |mut caller: #rt::wasmtime_crate::Caller<'_, T> #(, #arg_decls)*| -> Result<#ret_ty, #rt::wasmtime_crate::Trap> {
let result = async { #body };
#rt::run_in_dummy_executor(result)
#rt::run_in_dummy_executor(result)?
},
)?;
}