MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / panic

Function panic

compiler/src/main/mod.rs:48–54  ·  view source on GitHub ↗
(info: &core::panic::PanicInfo)

Source from the content-addressed store, hash-verified

46/* Best-effort panic-to-stash so the host gets a typed message instead of an opaque trap. Re-entry during the format alloc falls through to unreachable(), same trap as before. */
47#[panic_handler]
48fn panic(info: &core::panic::PanicInfo) -> ! {
49 let msg = alloc::format!("internal panic: {}", info.message());
50 with_runtime(|rt| {
51 rt.error_stash.set(crate::abi::ErrorKind::Runtime as u32, msg);
52 });
53 core::arch::wasm32::unreachable()
54}
55
56pub(super) const SZ: usize = 1 << 20;
57

Callers

nothing calls this directly

Calls 2

with_runtimeFunction · 0.85
setMethod · 0.80

Tested by

no test coverage detected