better panic formatting
This commit is contained in:
parent
8f2f89eae6
commit
7429ab83c8
1 changed files with 4 additions and 5 deletions
|
|
@ -59,12 +59,11 @@ pub extern fn eh_personality() {
|
||||||
|
|
||||||
#[lang = "panic_fmt"] #[no_mangle]
|
#[lang = "panic_fmt"] #[no_mangle]
|
||||||
pub extern fn panic_fmt(
|
pub extern fn panic_fmt(
|
||||||
fmt: core::fmt::Arguments,
|
fmt: core::fmt::Arguments, file: &'static str, line: u32)
|
||||||
file: &'static str,
|
|
||||||
line: u32)
|
|
||||||
-> ! {
|
-> ! {
|
||||||
println!("\n\nPANIC in {} at line {}:", file, line);
|
println!("PANIC: {}", fmt);
|
||||||
println!(" {}", fmt);
|
println!("FILE: {}", file);
|
||||||
|
println!("LINE: {}", line);
|
||||||
loop {}
|
loop {}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue