|
|
|
@ -1,16 +1,17 @@
|
|
|
|
|
use core::panic::PanicInfo;
|
|
|
|
|
use crate::println;
|
|
|
|
|
|
|
|
|
|
#[panic_handler]
|
|
|
|
|
fn panic(info: &PanicInfo) -> ! {
|
|
|
|
|
if let Some(location) = info.location() {
|
|
|
|
|
// println!(
|
|
|
|
|
// "Panicked at {}:{} {}",
|
|
|
|
|
// location.file(),
|
|
|
|
|
// location.line(),
|
|
|
|
|
// info.message().unwrap()
|
|
|
|
|
// );
|
|
|
|
|
println!(
|
|
|
|
|
"Panicked at {}:{} {}",
|
|
|
|
|
location.file(),
|
|
|
|
|
location.line(),
|
|
|
|
|
info.message().unwrap()
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
// println!("Panicked: {}", info.message().unwrap());
|
|
|
|
|
println!("Panicked: {}", info.message().unwrap());
|
|
|
|
|
}
|
|
|
|
|
loop {
|
|
|
|
|
|
|
|
|
|