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

Conversation

tleedjarv
Copy link
Contributor

This PR extracts the more general commits from #1013.

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)
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)
Clean up the exception matching and retry handling code, to unify UI
termination and reduce code duplication.
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.
@gdt gdt merged commit 5f07978 into bcpierce00:master Apr 24, 2024
29 checks passed
@tleedjarv tleedjarv deleted the retry-fixes branch April 24, 2024 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants