Refactor
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
//! Panic handler and diagnostic display.
|
||||
//!
|
||||
//! Prints panic information to the kernel log and displays the message on the
|
||||
//! framebuffer before halting the CPU.
|
||||
use core::arch::riscv64::wfi;
|
||||
|
||||
use alloc::{format, string::ToString};
|
||||
@@ -6,6 +10,7 @@ use log::error;
|
||||
use crate::vga::{Color, Vga, FONT_HEIGHT};
|
||||
|
||||
#[panic_handler]
|
||||
/// Kernel panic handler that displays the panic message on the framebuffer and halts.
|
||||
fn panic(panic_info: &core::panic::PanicInfo) -> ! {
|
||||
error!("PANIC !");
|
||||
let mut panic_message = panic_info.message().to_string();
|
||||
|
||||
Reference in New Issue
Block a user