Skip to content

Commit 74ce1e5

Browse files
committed
Fix font weight validation error checking
1 parent 36a88f4 commit 74ce1e5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

mlapptools.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ function validatealignmentstr(alignment)
163163

164164
if ~any(ismember(weight, validstrs))
165165
msgID = 'mlapptools:fontWeight:InvalidFontWeightString';
166-
error(msgID, 'Invalid font weight specified: ''%s''', alignment);
166+
error(msgID, 'Invalid font weight specified: ''%s''', weight);
167167
end
168168
elseif isnumeric(weight)
169169
weight = round(weight, -2);
@@ -175,7 +175,8 @@ function validatealignmentstr(alignment)
175175

176176
weight = num2str(weight);
177177
else
178-
% Throw error
178+
msgID = 'mlapptools:fontWeight:InvalidFontWeight';
179+
error(msgID, 'Invalid font weight specified: ''%s''', weight);
179180
end
180181
end
181182

0 commit comments

Comments
 (0)