print to vga on panic

This commit is contained in:
pantonshire committed 2024-10-18 14:09:43 +01:00
1 parent 5d0539b987
commit b0e757769a
1 file changed
+6 -1
+6 -1
View File
@@ -25,7 +25,12 @@ unsafe extern "C" {
}
#[panic_handler]
fn panic(_info: &PanicInfo) -> ! {
fn panic(info: &PanicInfo) -> ! {
vga_println!("panic!");
if let Some(location) = info.location() {
vga_println!("{}", location);
}
vga_println!("{}", info.message());
hlt()
}