Commit d4e52b5
committed
fix(HPatchZNative): unwrap OperationCanceledException from AggregateException
SharpHDiffPatch.Core uses Task.WaitAll internally which wraps
OperationCanceledException inside AggregateException. The existing
catch (OperationCanceledException) didn't match, causing the cancel
to fall through to the generic catch and get wrapped as an
InvalidOperationException - surfacing as 'corrupted installation'.
Add FindCancellation() recursive helper that walks AggregateException
and InnerException chains. New catch clause unwraps and re-throws the
original OperationCanceledException for both ApplyPatch and ApplyDirPatch.1 parent 8b4ce67 commit d4e52b5
1 file changed
Lines changed: 36 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
60 | 66 | | |
61 | 67 | | |
62 | 68 | | |
| |||
121 | 127 | | |
122 | 128 | | |
123 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
124 | 138 | | |
125 | 139 | | |
126 | 140 | | |
| |||
137 | 151 | | |
138 | 152 | | |
139 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
140 | 176 | | |
0 commit comments