(
mut store: WasmtimeStoreContextMut<'_>,
exn: &wasmtime_exnref_t,
)
| 83 | |
| 84 | #[unsafe(no_mangle)] |
| 85 | pub unsafe extern "C" fn wasmtime_context_set_exception( |
| 86 | mut store: WasmtimeStoreContextMut<'_>, |
| 87 | exn: &wasmtime_exnref_t, |
| 88 | ) -> Option<Box<wasm_trap_t>> { |
| 89 | let mut scope = RootScope::new(&mut store); |
| 90 | let rooted = exn.as_wasmtime()?.to_rooted(&mut scope); |
| 91 | let Err(thrown) = scope |
| 92 | .as_context_mut() |
| 93 | .throw::<std::convert::Infallible>(rooted); |
| 94 | Some(Box::new(wasm_trap_t::new(thrown))) |
| 95 | } |
| 96 | |
| 97 | #[unsafe(no_mangle)] |
| 98 | pub extern "C" fn wasmtime_context_take_exception( |
no test coverage detected