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

Better exception handling around self-check #12865

Merged

Commits on Jul 21, 2024

  1. Move exception suppression to cover more of self-version-check logic

    This correctly suppresses issues around building networking sessions for
    a self version check.
    pradyunsg committed Jul 21, 2024
    Configuration menu
    Copy the full SHA
    be21d82 View commit details
    Browse the repository at this point in the history
  2. Rework how --debug is handled in main

    Move the `run` call into a wrapper function and inline the exception
    handling while moving the try-finally around `run` into the
    nested function.
    
    This reduces the amount of code at a deeper nesting level and moves the
    self-version-check logic into the "around the run" exception catching so
    that a consistent message is presented in cases of failures.
    pradyunsg committed Jul 21, 2024
    Configuration menu
    Copy the full SHA
    3518d32 View commit details
    Browse the repository at this point in the history
  3. Properly mock _self_version_check_logic

    Providing a value return value ensures that downstream code does not try
    to pass around invalid values.
    pradyunsg committed Jul 21, 2024
    Configuration menu
    Copy the full SHA
    e503141 View commit details
    Browse the repository at this point in the history