Commit b1fe79c
fix: only throw PipelineFailedException on success path
When an exception occurs during pipeline execution (e.g. ModuleFailedException),
the original exception should be rethrown after OnEnd() completes. The previous
implementation incorrectly threw PipelineFailedException in the catch block,
replacing the original exception.
This fix adds a throwOnFailure parameter to OnEnd() to distinguish:
- Success path: throwOnFailure=true, may throw PipelineFailedException
- Error path: throwOnFailure=false, preserves original exception
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 5f9e96e commit b1fe79c
1 file changed
Lines changed: 6 additions & 4 deletions
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
| 127 | + | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
132 | | - | |
| 133 | + | |
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
| |||
154 | 155 | | |
155 | 156 | | |
156 | 157 | | |
157 | | - | |
| 158 | + | |
| 159 | + | |
158 | 160 | | |
159 | 161 | | |
160 | 162 | | |
| |||
0 commit comments