Skip to content

Commit

Permalink
changed from warning to error
Browse files Browse the repository at this point in the history
Throwing a warning can lead to a bug when all the trials are bad but this is ignored.
  • Loading branch information
vlitvak committed Nov 15, 2024
1 parent 4d6d97d commit 14369ef
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions spm_eeg_remove_bad_trials.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
%-Check that there is any good data available
%--------------------------------------------------------------------------
if ntrials(D)==0 || isempty(indtrial(D, D.condlist, 'GOOD'))
warning('No good trials were found. Nothing to do.');
return;
error('No good trials were found.');
end

cl = D.condlist;
Expand Down

0 comments on commit 14369ef

Please sign in to comment.