Commit 6f39f8b
fix: raise constructed exceptions that were silently discarded
Several guard clauses constructed an exception object but never raised
it, so the error path fell through instead of failing loud. For the
PSFEx interpolation runner (#785) this meant a typo'd MODE skipped all
branches, returned (None, None), and let the pipeline record success
with no interpolated PSF catalogue.
Add the missing `raise` at every site found by grepping src for
constructed-but-unraised exceptions:
- modules/psfex_interp_runner.py invalid MODE (#785)
- modules/mccd_interp_runner.py invalid MODE (x2: VALIDATION + else)
- modules/mask_package/mask.py invalid mask type
- pipeline/file_handler.py non-str match pattern
- pipeline/file_io.py non-ndarray col_data
Closes #785
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 47bbce5 commit 6f39f8b
5 files changed
Lines changed: 6 additions & 6 deletions
File tree
- src/shapepipe
- modules
- mask_package
- pipeline
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1070 | 1070 | | |
1071 | 1071 | | |
1072 | 1072 | | |
1073 | | - | |
| 1073 | + | |
1074 | 1074 | | |
1075 | 1075 | | |
1076 | 1076 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
792 | 792 | | |
793 | 793 | | |
794 | 794 | | |
795 | | - | |
| 795 | + | |
796 | 796 | | |
797 | 797 | | |
798 | 798 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1389 | 1389 | | |
1390 | 1390 | | |
1391 | 1391 | | |
1392 | | - | |
| 1392 | + | |
1393 | 1393 | | |
1394 | 1394 | | |
1395 | 1395 | | |
| |||
0 commit comments