Commit e55df62
committed
Remove an
When `catch_fatal_errors` catches a `FatalErrorMarker`, it returns an
`ErrorGuaranteed` that is conjured out of thin air with
`unchecked_claim_error_was_emitted`. But that `ErrorGuaranteed` is never
used.
This commit changes it to instead conjure a `FatalError` out of thin
air. (A non-deprecated action!) This makes more sense because
`FatalError` and `FatalErrorMarker` are a natural pairing -- a
`FatalErrorMarker` is created by calling `FatalError::raise`, so this is
effectively getting back the original `FatalError`.
This requires a tiny change in `catch_with_exit_code`. The old result of
the `catch_fatal_errors` call there was
`Result<Result<(), ErrorGuaranteed>, ErrorGuaranteed>` which could be
`flatten`ed into `Result<(), ErrorGuaranteed>`. The new result of the
`catch_fatal_errors` calls is
`Result<Result<(), ErrorGuaranteed>, FatalError>`, which can't be
`flatten`ed but is still easily matched for the success case.unchecked_claim_error_was_emitted call.1 parent 8d1c20a commit e55df62
1 file changed
+8
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
1231 | 1233 | | |
1232 | 1234 | | |
1233 | 1235 | | |
1234 | | - | |
| 1236 | + | |
1235 | 1237 | | |
1236 | 1238 | | |
1237 | | - | |
1238 | | - | |
| 1239 | + | |
1239 | 1240 | | |
1240 | 1241 | | |
1241 | 1242 | | |
| |||
1245 | 1246 | | |
1246 | 1247 | | |
1247 | 1248 | | |
1248 | | - | |
1249 | | - | |
1250 | | - | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
1251 | 1252 | | |
1252 | 1253 | | |
1253 | 1254 | | |
| |||
0 commit comments