From 77d2dbcb4afda9d28310a4a35b68183f83a0c882 Mon Sep 17 00:00:00 2001 From: Aditya Vaidya Date: Sun, 22 Feb 2026 16:56:11 -0800 Subject: [PATCH] ENH more useful error message --- cortex/database.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)