Skip to content

Form fix public error handling - #1108

Merged
wwuoneway merged 3 commits into
Framework-R-D:mainfrom
aolivier23:form_fix_public_error_handling
Nov 24, 2026
Merged

wwuoneway merged 3 commits into
Framework-R-D:mainfrom
aolivier23:form_fix_public_error_handling

Conversation

@aolivier23

@aolivier23 aolivier23 commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Removes form::experimental::error from public interface. FORM's registration code needs to throw an exception, and I accidentally replaced it with form::experimental::error. But form/util/error.hpp isn't exported by the project, and we probably don't want to export it. This mistake stops things like FORM parts of phlex-examples from compiling.

…pe_registry.hpp just throws a std::runtime_error like normal.
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: c2f294ed-b9a2-4a35-a504-20089fba7243

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The FORM source type registry now throws std::runtime_error when a conversion function is empty or product data is null. The header no longer includes util/error.hpp.

Changes: FORM registry error handling

Layer / File(s) Summary
Direct runtime errors
form/form/form_source_type_registry.hpp, form/form/form_source_type_registry.cpp
The registry now throws std::runtime_error for null product data and empty conversion functions. The header removes the util/error.hpp include.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Refactor

Possibly related PRs

  • Framework-R-D/phlex#1080: Both PRs change the same registry error call sites, but PR #1080 standardizes error messages through a helper that this PR bypasses.

Suggested reviewers: wwuoneway, knoepfel, gemmeren

Merge Risk: Minimal · previous review b9557

This is a small error-handling cleanup that keeps the same exception type and changes only the message text. No behavioral risk is identified. Run the formatter, using the @phlexbot format comment, to clear the failing format check before merging.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "Form fix public error handling" matches the changeset. The PR moves the public error path out of the registry. The registry now throws std::runtime_error instead of calling form::detail::ex…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title "Form fix public error handling" matches the changeset. The PR moves the public error path out of the registry. The registry now throws std::runtime_error instead of calling form::detail::experimental::error, and the util/error.hpp include is removed. The title is short and specific, though it uses the broad term "public error handling" and does not name the runtime_error change. That is a minor gap, not a mismatch.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
Fix failing CI checks

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@aolivier23

Copy link
Copy Markdown
Contributor Author

@phlexbot format

@github-actions

Copy link
Copy Markdown
Contributor

Format Fixes Applied

❌ clang-format workflow failure
❌ cmake-format workflow failure
❌ header-guards workflow failure
❌ jsonnetfmt workflow failure
❌ markdownlint workflow failure
❌ ruff workflow failure
❌ YAML formatter workflow failure

⚠️ Note: Some issues may require manual review.

@codecov

codecov Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@            Coverage Diff             @@
##             main    #1108      +/-   ##
==========================================
+ Coverage   91.45%   91.50%   +0.04%     
==========================================
  Files         185      185              
  Lines        6073     6073              
  Branches      973      973              
==========================================
+ Hits         5554     5557       +3     
+ Misses        331      328       -3     
  Partials      188      188              
Flag Coverage Δ
amd64 91.50% <100.00%> (+0.04%) ⬆️
arm64 91.50% <100.00%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
form/form/form_source_type_registry.cpp 100.00% <100.00%> (ø)
form/form/form_source_type_registry.hpp 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5a73c5c...68e9f57. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@wwuoneway wwuoneway left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@wwuoneway
wwuoneway merged commit 09e6cd4 into Framework-R-D:main Nov 24, 2026
44 checks passed
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