Repository navigation
Report a throwing status getter in its own row instead of crashing --status [patch] - #64
Merged
Merged
Conversation
…status [patch] StatusReport.Build read each detail's getter directly, and RunAsync invoked the State getter at the call site, so one throwing getter aborted the process (exit 134) and lost every row of the report. Both now go through StatusReport.Read, which absorbs non-fatal exceptions the same way the rest of the library does and prints "error: <message>" in that row. Fixes #62 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017vfJW4brDwN4YAzA6oCKV6
|
This was referenced Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes #62
What changed
StatusReport.Read(Func<string>)(internal) evaluates a tool's getter and, on a non-fatal exception (FatalError.IsNotFatal, as elsewhere in the library), returnserror: <message>instead of throwing.StatusReport.Buildreads every detail through it, andRunAsyncreads theStategetter through it, so one failing getter no longer aborts the process and loses the Platform / Tray icon rows.--status; the failing row carries the error.No public API change.
Tests
StatusReportTests.Build_WithAThrowingDetail_ReportsTheErrorInItsRowAndKeepsTheRestStatusReportTests.Read_WithAThrowingGetter_ReturnsTheErrorTrayAppBuilderTests.RunAsync_WithStatusAndThrowingGetters_PrintsEveryRowAndExitsZero(throwing State and detail getters through--no-tray --status)With the catch removed, all three fail with the getter's exception; with it, the full suite passes (163 passed, 1 skipped). Release build is clean.
Generated by Claude Code