Skip to content

Commit

Permalink
Update error message
Browse files Browse the repository at this point in the history
  • Loading branch information
sgilmore10 committed Oct 31, 2023
1 parent 5a955e9 commit 05fea3a
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@
function validateElement(obj, element)
if ~isa(element, obj.ClassName)
id = "arrow:array:list:ClassTypeMismatch";
msg = "Expected all cell array elements to be of class type " + ...
obj.ClassName + ", but encountered element of class type " + ...
class(element) + ".";
error(id, msg);
fmt = "Expected all cell array elements to have class type " + ...
"""%s"", but encountered an element whose class type is" + ...
" ""%s"".";
msg = compose(fmt, obj.ClassName, class(element));
error(id, msg);
end
end

Expand Down

0 comments on commit 05fea3a

Please sign in to comment.