Commit c381a63
committed
fix(thread): narrow except in _fallback_stream from BaseException to Exception
github-code-quality caught that the stream-error capture in f4c6253
used `except BaseException`, which would swallow CancelledError,
KeyboardInterrupt, SystemExit, and GeneratorExit along with the
normal runtime errors we want to flush around.
Narrowed to `except Exception`. Control-flow exceptions now propagate
immediately; the existing `finally: stop_event.set()` still signals
the background edit loop to exit cleanly on cancellation, so there's
no task leak on shutdown either.
https://claude.ai/code/session_01XE1bMoQ5BjCvgi1iLGKKhG1 parent f4c6253 commit c381a63
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
637 | 637 | | |
638 | 638 | | |
639 | 639 | | |
640 | | - | |
| 640 | + | |
641 | 641 | | |
642 | 642 | | |
643 | 643 | | |
| |||
648 | 648 | | |
649 | 649 | | |
650 | 650 | | |
651 | | - | |
| 651 | + | |
652 | 652 | | |
653 | 653 | | |
654 | 654 | | |
655 | 655 | | |
656 | 656 | | |
657 | 657 | | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
658 | 665 | | |
659 | 666 | | |
660 | 667 | | |
| |||
0 commit comments