Panic handler

This commit is contained in:
greg 2019-07-11 01:47:49 -07:00
parent ec115c43c4
commit 5be5acfef9

View File

@ -7,13 +7,15 @@ mod vga_buffer;
use core::panic::PanicInfo; use core::panic::PanicInfo;
#[panic_handler] #[panic_handler]
fn panic(_info: &PanicInfo) -> !{ fn panic(info: &PanicInfo) -> !{
println!("{}", info);
loop {} loop {}
} }
#[no_mangle] #[no_mangle]
pub extern "C" fn _start() -> ! { pub extern "C" fn _start() -> ! {
println!("Gamarjoba, munde: {}", 1); println!("Gamarjoba, munde: {}", 1);
panic!("A bad thing happened");
loop {} loop {}
} }