Commit 2300d52
Fix: Narrow exception handling in sort_for_self_referencing function
- Replaced broad 'except Exception' with specific Polars exceptions
- Now only catches pl.exceptions.ComputeError and pl.exceptions.ShapeError for schema/validation issues
- FileNotFoundError and other system exceptions now properly propagate as fatal errors
- This prevents masking important system errors like PermissionError while still handling
CSV parsing/schema validation gracefully
Addresses review comment about overly broad exception handling.1 parent 3b77659 commit 2300d52
1 file changed
+3
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 59 | + | |
| 60 | + | |
66 | 61 | | |
67 | 62 | | |
68 | 63 | | |
| |||
0 commit comments