1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-07-24 15:38:22 +00:00

rust: print filename:lineno in case of fatal error

This commit is contained in:
grdddj 2023-03-30 18:38:22 +02:00
parent 7e35510a5d
commit d435142d3c

View File

@ -39,6 +39,9 @@ fn panic_debug(panic_info: &core::panic::PanicInfo) -> ! {
if let Some(location) = panic_info.location() {
let file = location.file();
print!(file);
print!(":");
println!(inttostr!(location.line()));
trezorhal::fatal_error::__fatal_error("", "rs", file, location.line(), "");
} else {
trezorhal::fatal_error::__fatal_error("", "rs", "", 0, "");