akern-gkgoat-fork/ableos/src/panic.rs

18 lines
331 B
Rust
Raw Normal View History

2022-08-05 06:22:23 -05:00
/*
* Copyright (c) 2022, able <abl3theabove@gmail.com>
*
* SPDX-License-Identifier: MPL-2.0
*/
2022-07-29 12:48:45 -05:00
use core::panic::PanicInfo;
use log::error;
use crate::arch::interrupts::{bsod, BSODSource};
2022-08-05 06:22:23 -05:00
#[cfg(not(test))]
2022-07-29 12:48:45 -05:00
#[panic_handler]
fn panic_handler(info: &PanicInfo) -> ! {
2022-08-01 02:16:19 -05:00
error!("{:?}", info);
2022-07-29 12:48:45 -05:00
bsod(BSODSource::Panic(info));
}