Skip to content

Commit a99d39f

Browse files
committed
improve error message
More descriptive error for loading epochs beyond EEG boundaries
1 parent 894e563 commit a99d39f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

cmlreaders/readers/eeg.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,9 @@ def read(self) -> Tuple[np.ndarray, List[int]]:
295295
)
296296
except ValueError: # requesting event-epoched data beyond final sample of EEG
297297
raise exc.MissingDataError(
298-
"Unable to load EEG for some events because rel_stop parameter is " +
299-
"beyond final sample of EEG recording."
298+
"Unable to load EEG for some events because rel_start or rel_stop parameter " +
299+
"is beyond the first or last sample of the EEG recording. Try loading EEG " +
300+
"again after dropping the first or last event(s)."
300301
)
301302

302303
return data, contacts

0 commit comments

Comments
 (0)