feat: much better panic message

include the most helpful: the panic error message
This commit is contained in:
Cyrix126 2024-11-01 21:05:44 +01:00
parent 68a69992e7
commit 2c9187c29d

View file

@ -13,10 +13,11 @@ pub(crate) fn set_panic_hook(now: std::time::Instant) {
let stack_trace = std::backtrace::Backtrace::force_capture();
let args = std::env::args_os();
let uptime = now.elapsed().as_secs_f32();
let panic_msg = panic_info.to_string();
// Re-format panic info.
let panic_info = format!(
"{panic_info:#?}
"panic error: {panic_msg}\n
{panic_info:#?}
info:
OS | {OS_NAME}