Skip to content

Commit c1ef262

Browse files
Merge pull request #145 from Devguru-codes/fix-bare-except-full-volume
fix: replace bare except with except Exception in osipi_fit_full_volume
2 parents d45d9fe + b8971d7 commit c1ef262

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/wrappers/OsipiBase.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,10 +374,12 @@ def osipi_fit_full_volume(self, data, bvalues=None, **kwargs):
374374

375375
return results
376376

377-
except:
377+
except Exception as e:
378378
# Check if the problem is that full volume fitting is simply not supported in the standardized implementation
379379
if not hasattr(self, "ivim_fit_full_volume"): #and callable(getattr(self, "ivim_fit_full_volume")):
380380
print("Full volume fitting not supported for this algorithm")
381+
else:
382+
print(f"Full volume fitting failed: {type(e).__name__}: {e}")
381383

382384
return False
383385

0 commit comments

Comments
 (0)