mirror of
https://github.com/Noratrieb/libuwuc.git
synced 2026-01-14 19:55:07 +01:00
reading env vars
This commit is contained in:
parent
ddba35d06b
commit
0c69d7db10
7 changed files with 121 additions and 16 deletions
|
|
@ -1,3 +1,4 @@
|
|||
#![feature(panic_info_message)]
|
||||
#![cfg_attr(not(test), no_std)]
|
||||
#![no_main]
|
||||
|
||||
|
|
@ -9,8 +10,13 @@ extern crate libuwuc;
|
|||
|
||||
#[panic_handler]
|
||||
#[cfg(not(test))]
|
||||
fn handler(_arg: &core::panic::PanicInfo) -> ! {
|
||||
libuwuc::io::println!("panic!");
|
||||
fn handler(arg: &core::panic::PanicInfo) -> ! {
|
||||
let args = format_args!("<no message>");
|
||||
let payload = arg.message().unwrap_or(&args);
|
||||
libuwuc::io::println!("panicked: {payload}");
|
||||
if let Some(loc) = arg.location() {
|
||||
libuwuc::io::println!(" at {}:{}:{}", loc.file(), loc.line(), loc.column());
|
||||
}
|
||||
libuwuc::start::exit(1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue