Skip to content

Commit 0fbd2c4

Browse files
committed
refactor missing argument error
1 parent 39ce054 commit 0fbd2c4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/saveEventsFile.m

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@
7373
%
7474

7575
if nargin < 2
76-
error(['Missing arguments. Please specify <action input> ', ...
77-
'and <cfg file> as the first two arguments']);
76+
errorSaveEventsFile('missingArgument')
7877
end
7978

8079
if nargin < 3 || isempty(logFile)
@@ -508,6 +507,10 @@ function printData(output, data, cfg)
508507
function errorSaveEventsFile(identifier)
509508

510509
switch identifier
510+
case 'missingArgument'
511+
errorStruct.message = ['Missing arguments. Please specify <action input> ', ...
512+
'and <cfg file> as the first two arguments'];
513+
511514
case 'unknownActionType'
512515
errorStruct.message = 'unknown action for saveEventsFile';
513516

0 commit comments

Comments
 (0)