Skip to content

Commit cdcdf31

Browse files
Copilotakhanf
andauthored
Fix exception handling to use except Exception as e with logging
Agent-Logs-Url: https://github.com/khanlab/SPIMquant/sessions/7b6fb2c4-f7b5-4329-944e-d9191a3c0f96 Co-authored-by: akhanf <11492701+akhanf@users.noreply.github.com>
1 parent 012c1ee commit cdcdf31

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

spimquant/workflow/scripts/compute_subject_histogram.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
)
3333
znimg_ds = candidate
3434
break
35-
except Exception:
36-
pass
35+
except Exception as e:
36+
print(f" level {ds_level} not available ({e}), trying lower level")
3737

3838
if znimg_ds is None:
3939
znimg_ds = ZarrNii.from_ome_zarr(

spimquant/workflow/scripts/multiotsu_group.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
)
5151
znimg_ds = candidate
5252
break
53-
except Exception:
54-
pass
53+
except Exception as e:
54+
print(f" level {ds_level} not available ({e}), trying lower level")
5555

5656
if znimg_ds is None:
5757
znimg_ds = ZarrNii.from_ome_zarr(

0 commit comments

Comments
 (0)