You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: clean separation of output and exception handling
Redesign ExecuteInternal to use a linear three-step flow:
1. Execute pipeline, capture any exception (don't rethrow yet)
2. Always print summary exactly once via PrintSummary()
3. Handle exceptions: rethrow original OR throw PipelineFailedException
This replaces the previous try/catch structure which had a bug where
OnEnd could execute twice if it threw PipelineFailedException (caught
by the catch block, which would call OnEnd again).
Key changes:
- Rename OnEnd to PrintSummary (single responsibility - only output)
- PrintSummary never throws, just prints and returns
- Use ExceptionDispatchInfo to preserve original stack trace
- Exception decision logic is now linear and explicit
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
0 commit comments