Skip to content

Fix clang-tidy bugprone-exception-escape in sum_aggregation.cc#4109

Open
jensecrest wants to merge 2 commits into
open-telemetry:mainfrom
jensecrest:clangtidy-exceptionesc-sumagg
Open

Fix clang-tidy bugprone-exception-escape in sum_aggregation.cc#4109
jensecrest wants to merge 2 commits into
open-telemetry:mainfrom
jensecrest:clangtidy-exceptionesc-sumagg

Conversation

@jensecrest
Copy link
Copy Markdown

@jensecrest jensecrest commented May 28, 2026

Fixes #2053

Changes

Replace throwing nostd::get() calls with non-throwing nostd::get_if() in 4 noexcept functions. On type mismatch (which should never happen in practice), log an error and return a zero-valued aggregation instead of invoking std::terminate().

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

AI

Assisted-by: This contribution was prepared with the assistance of an AI development tool.

@jensecrest jensecrest requested a review from a team as a code owner May 28, 2026 20:03
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented May 28, 2026

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: jensecrest / name: Jen (c57175b)
  • ✅ login: jensecrest / name: Jennifer Secrest (671202e)

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.

[Code health] clang-tidy cleanup

1 participant