diff --git a/cortex/database.py b/cortex/database.py index 3979da13..c99262b1 100644 --- a/cortex/database.py +++ b/cortex/database.py @@ -526,7 +526,7 @@ def get_surf(self, subject, type, hemisphere="both", merge=False, nudge=False): fnm = str(os.path.splitext(files[type][hemi])[0]) return formats.read(fnm) except KeyError: - raise IOError + raise IOError(f"Surface type '{type}' not found for {hemi} hemisphere of subject '{subject}'") def save_mask(self, subject, xfmname, type, mask): fname = self.get_paths(subject)['masks'].format(xfmname=xfmname, type=type)