Improve panic handler

This commit is contained in:
Philipp Oppermann
2015-11-14 10:59:48 +01:00
parent fc389c9e9e
commit f2b91d3d61
2 changed files with 29 additions and 1 deletions

View File

@@ -51,4 +51,8 @@ extern fn eh_personality() {}
#[cfg(not(test))]
#[lang = "panic_fmt"]
extern fn panic_fmt() -> ! {loop{}}
extern fn panic_fmt(fmt: core::fmt::Arguments, file: &str, line: u32) -> ! {
println!("\n\nPANIC in {} at line {}:", file, line);
println!(" {}", fmt);
loop{}
}