Commit 439ee7b
authored
fix: do not abort Actor exit when the terminal status message fails (#1078)
In `_ActorType.__aexit__`, the terminal `set_status_message()` call was
the only step in `finalize()` not wrapped in `try`/`except Exception`. A
transient API error there propagated out of `__aexit__` and skipped
everything after it: the event manager exit, the charging manager exit,
`_save_actor_state()` and `sys.exit(self.exit_code)`. The run then died
with an unrelated traceback, the wrong exit code, and unpersisted state.
The call is now guarded the same way as the three steps that follow it -
the failure is logged and cleanup continues.
*✍️ Drafted by Claude Code*1 parent 8905a97 commit 439ee7b
2 files changed
Lines changed: 32 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
264 | 267 | | |
265 | 268 | | |
266 | 269 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
413 | 441 | | |
414 | 442 | | |
415 | 443 | | |
| |||
0 commit comments