Unverified Commit eabb1170 authored by Alexander Theißen's avatar Alexander Theißen Committed by GitHub
Browse files

Print panic message to debug buffer (#894)

parent 4ed39bac
Pipeline #152952 passed with stages
in 31 minutes and 36 seconds
......@@ -44,8 +44,12 @@
#[cfg(all(not(feature = "std"), target_arch = "wasm32"))]
fn panic(_info: &core::panic::PanicInfo) -> ! {
fn panic(info: &core::panic::PanicInfo) -> ! {
// This code gets removed in release builds where the macro will expand into nothing.
debug_print!("{}\n", info);
// SAFETY: We only use this operation if we are guaranteed to be in Wasm32 compilation.
// This is used in order to make any panic a direct abort avoiding Rust's general
// panic infrastructure.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment