Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print thread ID in panic message if thread name is unknown #115746

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jun 19, 2024

  1. 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>' (1234) panicked at src/main.rs:3:5:
        explicit panic
    
    This change applies to both named and unnamed threads. There is no
    change for threads where an ID cannot be determined.
    tgross35 committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    c322091 View commit details
    Browse the repository at this point in the history