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

Some code cleanups for the repeat mode #1024

Merged
merged 4 commits into from
Apr 24, 2024
Merged

Commits on Apr 24, 2024

  1. Execute less code when retrying after an error

    In text UI, when retrying after an error in repeat mode, unnecessary
    amount of code was being re-executed on each retry. This patch removes
    the early init code from the retry loop as it only needs to be executed
    once and will either succeed or fail, there is no retry.
    
    (best reviewed with whitespace ignored)
    tleedjarv committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    0da72e9 View commit details
    Browse the repository at this point in the history
  2. Execute text UI preferences init code only once

    This patch moves execution of some text UI preferences init code, which
    does not need to be repeated every time, out of the retry loop (that is,
    from after a successful connection to before attempting the connection).
    
    (best reviewed with moves highlighted and indentation ignored; for
    example: --color-moved --color-moved-ws=allow-indentation-change)
    tleedjarv committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    4598908 View commit details
    Browse the repository at this point in the history
  3. Clean up exception handling and retry code

    Clean up the exception matching and retry handling code, to unify UI
    termination and reduce code duplication.
    tleedjarv committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    d4a2387 View commit details
    Browse the repository at this point in the history
  4. Classify/Label errors in the UI, not in [exn2str]

    The [exn2str] function used to add superfluous labels to error messages,
    in some cases classifying errors as fatal or not (historically likely at
    least partially due to debugging needs). This function does not know the
    consequences of the error nor further actions to be taken. These labels
    can then become misleading.
    
    These labels, if needed at all, should be under the control of each
    respective UI.
    tleedjarv committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    ef60676 View commit details
    Browse the repository at this point in the history