1
0
Fork 0
zynq-rs/libsupport_zynq/src/panic.rs

19 lines
444 B
Rust
Raw Normal View History

2020-07-06 21:03:36 +08:00
use libboard_zynq::{print, println};
2019-11-11 09:37:06 +08:00
#[panic_handler]
fn panic(info: &core::panic::PanicInfo) -> ! {
2019-12-17 07:27:20 +08:00
print!("panic at ");
if let Some(location) = info.location() {
print!("{}:{}:{}", location.file(), location.line(), location.column());
} else {
print!("unknown location");
}
if let Some(message) = info.message() {
println!(": {}", message);
} else {
println!("");
}
2019-11-11 09:37:06 +08:00
loop {}
}