starina_api/
panic.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
use core::panic::PanicInfo;

use crate::println;

#[cfg_attr(target_os = "none", panic_handler)]
#[cfg_attr(not(target_os = "none"), allow(unused))]
fn panic(info: &PanicInfo) -> ! {
    println!(
        "[{}] \x1b[1;91mPANIC: {}\x1b[0m",
        ::core::module_path!(),
        info
    );
    loop {}
}