mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-27 08:58:28 +00:00
rust: print filename:lineno in case of fatal error
This commit is contained in:
parent
7e35510a5d
commit
d435142d3c
@ -39,6 +39,9 @@ fn panic_debug(panic_info: &core::panic::PanicInfo) -> ! {
|
|||||||
|
|
||||||
if let Some(location) = panic_info.location() {
|
if let Some(location) = panic_info.location() {
|
||||||
let file = location.file();
|
let file = location.file();
|
||||||
|
print!(file);
|
||||||
|
print!(":");
|
||||||
|
println!(inttostr!(location.line()));
|
||||||
trezorhal::fatal_error::__fatal_error("", "rs", file, location.line(), "");
|
trezorhal::fatal_error::__fatal_error("", "rs", file, location.line(), "");
|
||||||
} else {
|
} else {
|
||||||
trezorhal::fatal_error::__fatal_error("", "rs", "", 0, "");
|
trezorhal::fatal_error::__fatal_error("", "rs", "", 0, "");
|
||||||
|
Loading…
Reference in New Issue
Block a user