Skip to content

Add CallerArgumentExpression support to improve WrapHandled diagnostics (#12267)#12268

Merged
yasmoradi merged 1 commit into
bitfoundation:developfrom
Cyrus-Sushiant:12267-improve-appcomponentbase
Apr 20, 2026
Merged

Add CallerArgumentExpression support to improve WrapHandled diagnostics (#12267)#12268
yasmoradi merged 1 commit into
bitfoundation:developfrom
Cyrus-Sushiant:12267-improve-appcomponentbase

Conversation

@Cyrus-Sushiant
Copy link
Copy Markdown
Member

@Cyrus-Sushiant Cyrus-Sushiant commented Apr 18, 2026

closes #12267

Summary by CodeRabbit

  • Refactor
    • Enhanced error handling with improved diagnostic information capture for better exception troubleshooting.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 18, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 12f42bef-0ff5-4dc8-8b84-a3ae9694bc4e

📥 Commits

Reviewing files that changed from the base of the PR and between 11c0dc8 and 921ec8a.

📒 Files selected for processing (1)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/AppComponentBase.cs

Walkthrough

This PR enhances exception logging in AppComponentBase by adding CallerArgumentExpression parameters to all WrapHandled method overloads. The captured delegate expressions are propagated through the exception handling chain and stored in the parameters dictionary for improved debugging visibility.

Changes

Cohort / File(s) Summary
Expression Capturing in Exception Handler
src/Templates/Boilerplate/.../Components/AppComponentBase.cs
Added optional argExpression parameters to five WrapHandled overloads and updated HandleException to capture and store the delegate expression text under the "Expression" key in the exception parameters dictionary.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A lambda passed in darkness, now shines so bright,
CallerArgumentExpression brings forth the light!
Expressions captured, stored with care,
Exception logs now show exactly what's there! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and specifically describes the main change: adding CallerArgumentExpression support to WrapHandled to improve diagnostics.
Linked Issues check ✅ Passed The pull request implements the exact requirements from issue #12267: using CallerArgumentExpression to capture lambda expressions and passing them to HandleException for improved diagnostics.
Out of Scope Changes check ✅ Passed All changes are scoped to implementing CallerArgumentExpression support in WrapHandled overloads and HandleException as specified in issue #12267, with no extraneous modifications.
Docstring Coverage ✅ Passed Docstring coverage is 83.33% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@yasmoradi yasmoradi merged commit 19f78b8 into bitfoundation:develop Apr 20, 2026
3 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.

Improve logging by capturing and displaying lambda expressions in AppComponentBase of Boilerplate project template

3 participants