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

code: handle repr'ing empty tracebacks gracefully #10907

Merged
merged 1 commit into from Apr 13, 2023

Commits on Apr 13, 2023

  1. code: handle repr'ing empty tracebacks gracefully

    By "empty traceback" I mean a traceback all of whose entries have been
    filtered/cut/pruned out.
    
    Currently, if an empty traceback needs to be repr'ed, the last entry
    before the filtering is used instead (added in
    accd962).
    
    Showing a hidden frame is not so good IMO. This commit does the
    following instead:
    
    1. Shows details of the exception.
    2. Shows a message about how the full trace can be seen.
    
    Example:
    
    ```
    _____________ test _____________
    
    E   ZeroDivisionError: division by zero
    All traceback entries are hidden. Pass `--full-trace` to see hidden and internal frames.
    ```
    
    Also handles `--tb=native`, though there the `--full-trace` bit is not
    shown.
    
    This commit contains some pieces from
    431ec6d (which has been reverted).
    
    Helps towards fixing issue # 1904.
    
    Co-authored-by: Felix Hofstätter <Felhof1@hotmail.com>
    bluetech and Felhof committed Apr 13, 2023
    Configuration menu
    Copy the full SHA
    e3b1799 View commit details
    Browse the repository at this point in the history