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

Reduce duplication when handling "DocException" and "PasswordRequest" messages #19259

Merged
merged 1 commit into from
Dec 29, 2024

Conversation

Snuffleupagus
Copy link
Collaborator

Rather than having to manually implement the exception-handling for the "DocException" message, we can instead re-use (and slightly extend) the existing wrapReason function since that one already does what we need.

Furthermore, we can also simplify handling of the "PasswordRequest" message a little bit and again re-use the wrapReason function.

Finally, the patch makes the following smaller changes:

  • Avoid needlessly re-creating exceptions in the wrapReason function.
  • Use a slightly shorter parameter name in the wrapReason function.
  • Remove the unused entries in the CallbackKind/StreamKind enumerations.

… messages

Rather than having to manually implement the exception-handling for the "DocException" message, we can instead re-use (and slightly extend) the existing `wrapReason` function since that one already does what we need.

Furthermore, we can also simplify handling of the "PasswordRequest" message a little bit and again re-use the `wrapReason` function.

Finally, the patch makes the following smaller changes:
 - Avoid needlessly re-creating exceptions in the `wrapReason` function.
 - Use a slightly shorter parameter name in the `wrapReason` function.
 - Remove the unused entries in the `CallbackKind`/`StreamKind` enumerations.
@Snuffleupagus
Copy link
Collaborator Author

/botio test

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.193.163.58:8877/08a575932054f88/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/7ce50464ddeacb5/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/7ce50464ddeacb5/output.txt

Total script time: 28.33 mins

  • Unit tests: Passed
  • Integration Tests: FAILED
  • Regression tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/08a575932054f88/output.txt

Total script time: 52.09 mins

  • Unit tests: FAILED
  • Integration Tests: Passed
  • Regression tests: Passed

@timvandermeij timvandermeij merged commit 8a50d2d into mozilla:master Dec 29, 2024
9 checks passed
@timvandermeij
Copy link
Contributor

Nice simplification!

@Snuffleupagus Snuffleupagus deleted the more-wrapReason branch December 29, 2024 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants