Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/saveEventsFile.m
Original file line number Diff line number Diff line change
Expand Up @@ -284,15 +284,15 @@ function printHeaderExtraColumns(logFile)

logFile(iEvent).(namesExtraColumns{iExtraColumn}) = data;

if ~ischar(data) && any(isnan(data))
if ~ischar(data) && any(isnan(data)) && cfg.verbose > 0
warning('saveEventsFile:missingData', ...
'Missing some %s data for this event.', namesExtraColumns{iExtraColumn});

if cfg.verbose > 1
disp(logFile(iEvent));
end

elseif ~ischar(data) && all(isnan(data))
elseif ~ischar(data) && all(isnan(data)) && cfg.verbose > 0
warning('Missing %s data for this event.', namesExtraColumns{iExtraColumn});

if cfg.verbose > 1
Expand Down Expand Up @@ -402,7 +402,7 @@ function printHeaderExtraColumns(logFile)
end

% now save the event to log file (if not skipping)
if skipEvent
if skipEvent && cfg.verbose > 0

warning(warningMessageID, warningMessage);

Expand Down
4 changes: 2 additions & 2 deletions tests/test_saveEventsFileSave.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function test_saveEventsFileSaveSkipEmptyEvents()

[cfg, logFile] = setUp();

cfg.verbose = false;
cfg.verbose = 1;

% create the events file and header
logFile = saveEventsFile('open', cfg, logFile);
Expand Down Expand Up @@ -144,7 +144,7 @@ function test_saveEventsFileSaveArraySize()

[cfg, logFile] = setUp();

cfg.verbose = false;
cfg.verbose = 1;

% create the events file and header
logFile = saveEventsFile('open', cfg, logFile);
Expand Down