From 34084a75e2e663daa19338edf2dbda1de653e82a Mon Sep 17 00:00:00 2001
From: Paul McCarthy <pauldmccarthy@gmail.com>
Date: Tue, 14 Apr 2020 15:51:43 +0100
Subject: [PATCH] MNT: more detailed error message

---
 fsl/data/image.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/fsl/data/image.py b/fsl/data/image.py
index 1dc0aaf93..eb9c468cc 100644
--- a/fsl/data/image.py
+++ b/fsl/data/image.py
@@ -622,8 +622,9 @@ class Nifti(notifier.Notifier, meta.Meta):
 
         if from_ not in ('voxel', 'fsl', 'world') or \
            to    not in ('voxel', 'fsl', 'world'):
-            raise ValueError('Invalid source/reference spaces: '
-                             '{} -> {}'.format(from_, to))
+            raise ValueError('Invalid source/reference spaces: "{}" -> "{}".'
+                             'Recognised spaces are "voxel", "fsl", and '
+                             '"world"'.format(from_, to))
 
         return np.copy(self.__affines[from_, to])
 
-- 
GitLab