parent
49050aca3f
commit
c701cd00ce
@ -1,6 +1,12 @@
|
||||
use core::panic::PanicInfo;
|
||||
use crate::sbi::shutdown;
|
||||
|
||||
#[panic_handler]
|
||||
fn panic(_info: &PanicInfo) -> ! {
|
||||
loop {}
|
||||
fn panic(info: &PanicInfo) -> ! {
|
||||
if let Some(location) = info.location() {
|
||||
println!("Panicked at {}:{} {}", location.file(), location.line(), info.message().unwrap());
|
||||
} else {
|
||||
println!("Panicked: {}", info.message().unwrap());
|
||||
}
|
||||
shutdown()
|
||||
}
|
||||
|
Loading…
Reference in new issue