add kernel panicking

This commit is contained in:
Conzer 2024-12-03 16:19:58 -05:00
parent e9660fbc76
commit 82f4bd2b09

View file

@ -5,7 +5,8 @@ mod vga_buffer;
use core::panic::PanicInfo;
#[panic_handler]
fn panic(_info: &PanicInfo) -> ! {
fn panic(info: &PanicInfo) -> ! {
println!("{}", info);
loop {}
}
@ -13,7 +14,7 @@ fn panic(_info: &PanicInfo) -> ! {
#[no_mangle]
pub extern "C" fn _start() -> ! {
println!("Hello World!");
panic!("Nothing to do.");
loop {}
}