Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bytecodealliance
GitHub Repository: bytecodealliance/wasmtime
Path: blob/main/examples/min-platform/embedding/src/panic.rs
2450 views
1
#![cfg(not(unix))] // gets `cargo clippy` working
2
3
use core::panic::PanicInfo;
4
5
#[panic_handler]
6
fn handler(_info: &PanicInfo) -> ! {
7
// NB: should ideally print something here but for this example this is left
8
// out. A more complete embedding would likely turn `info` into a
9
// stack-allocated string and then pass that as a message to the outer
10
// system to get printed and trigger a failure.
11
loop {}
12
}
13
14