Commit de1ae45
Add cycle detection to root_cause traversal in error classes
Addresses PR #150 review feedback: the root_cause property now tracks
visited exception IDs to prevent infinite loops if a circular __cause__
chain is accidentally introduced. Also handles empty cause messages
gracefully in _format_cause.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent fc04b36 commit de1ae45
1 file changed
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
| 18 | + | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
23 | | - | |
| 25 | + | |
24 | 26 | | |
25 | | - | |
26 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
| |||
0 commit comments