Skip to content

Eliminate exceptions from AccessPointControllerLinux::SetFrequencyBands#170

Merged
abeltrano merged 4 commits into
developfrom
freqbandstatusfromexcept
Feb 24, 2024
Merged

Eliminate exceptions from AccessPointControllerLinux::SetFrequencyBands#170
abeltrano merged 4 commits into
developfrom
freqbandstatusfromexcept

Conversation

@abeltrano
Copy link
Copy Markdown
Contributor

Type

  • Bug fix
  • Feature addition
  • Feature update
  • Documentation
  • Build Infrastructure

Side Effects

  • Breaking change
  • Non-functional change

Goals

  • Ensure the implementation of IAccessPointController functions do not throw exceptions to allow the API layer to avoid try/catch blocks.

Technical Details

  • Change IAccessPointController::SetFrequencyBands to return AccessPointOperationStatus instead of bool.
  • Update AccessPointControllerLinux::SetFrequencyBands to report errors consistently.

Test Results

  • All unit tests pass.

Reviewer Focus

  • None

Future Work

  • The code in AccessPointControllerLinux tries hard to have a single exit point, but it's complicating the implementation logic and looks messy. The implementation of the interface functions should instead prefer simpler control flow, exiting early where possible instead of maintaining a single exit point.

Checklist

  • Build target all compiles cleanly.
  • clang-format and clang-tidy deltas produced no new output.
  • Newly added functions include doxygen-style comment block.

@abeltrano abeltrano requested a review from a team as a code owner February 24, 2024 02:59
@abeltrano abeltrano merged commit 9da8158 into develop Feb 24, 2024
@abeltrano abeltrano deleted the freqbandstatusfromexcept branch February 24, 2024 03:14
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.

1 participant