6 Commits

Author SHA1 Message Date
Trevor Gross
289fe36d37 Print thread ID in panic message if thread name is unknown
`panic!` does not print any identifying information for threads that are
unnamed. However, in many cases, the thread ID can be determined.

This changes the panic message from something like this:

    thread '<unnamed>' panicked at src/main.rs:3:5:
    explicit panic

To something like this:

    thread '<unnamed>' (0xff9bf) panicked at src/main.rs:3:5:
    explicit panic

Stack overflow messages are updated as well.

This change applies to both named and unnamed threads. The ID printed is
the OS integer thread ID rather than the Rust thread ID, which should
also be what debuggers print.
2025-08-06 23:59:47 +00:00
John Kåre Alsaker
4bf85c25ec Try to write the panic message with a single write_all call 2025-01-01 15:58:29 +01:00
Eric Huss
f94142b366 Update tests to use new proc-macro header 2024-11-27 07:18:25 -08:00
Nilstrieb
41e8d152dc Show number in error message even for one error
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-24 19:15:52 +01:00
Mara Bos
0e729404da Change default panic handler message format. 2023-07-29 11:42:50 +02:00
Albert Larsan
cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00