(id: u32, kind: u32, msg_handle: u32)
| 284 | /* Raise an error into the `WaitingHostCall(id)` coro so its try/except can catch it; one failed host call affects only its coro. `msg_handle` is a string Val (via `encodeAny`). Same return codes as `set_host_result`. */ |
| 285 | #[unsafe(no_mangle)] |
| 286 | pub unsafe extern "C" fn set_host_error_by_id(id: u32, kind: u32, msg_handle: u32) -> i32 { |
| 287 | with_paused_vm(msg_handle, |vm, val| { |
| 288 | let msg = match vm.heap.get(val) { |
| 289 | HeapObj::Str(s) => s.clone(), |
| 290 | _ => String::new(), |
| 291 | }; |
| 292 | let e = super::errors::error_from_kind(kind, msg); |
| 293 | if vm.inject_host_error_by_id(id as u64, e) { 0 } else { 2 } |
| 294 | }) |
| 295 | } |
| 296 | |
| 297 | #[unsafe(no_mangle)] |
| 298 | pub extern "C" fn last_yield_deadline_ns() -> u64 { |
nothing calls this directly
no test coverage detected