Skip to content

Commit 9b40a9d

Browse files
psadileffigies
andauthored
Improve exception
Co-authored-by: Chris Markiewicz <[email protected]>
1 parent dd5f251 commit 9b40a9d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

sdcflows/utils/epimanip.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,8 @@ def get_trt(in_meta, in_file=None):
189189

190190
return trt
191191
elif in_file is None:
192-
msg = "Unable to find TotalReadoutTime in metadata and in_file \
193-
not defined."
194-
raise AssertionError(msg)
192+
msg = "`in_file` must be defined if TotalReadoutTime does not appear in `in_meta`."
193+
raise ValueError(msg)
195194

196195
# npe = N voxels PE direction
197196
pe_index = "ijk".index(in_meta["PhaseEncodingDirection"][0])

0 commit comments

Comments
 (0)