Skip to content

Commit

Permalink
Merge pull request #463 from NeurodataWithoutBorders/error-on-non-cel…
Browse files Browse the repository at this point in the history
…l-str

Add check for non-cellstr cell types
  • Loading branch information
lawrence-mbf authored Sep 6, 2022
2 parents 0e22ed9 + ef43e87 commit cd2baec
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions +io/mapData2H5.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
forceArray = any(strcmp('forceArray', varargin));
forceChunked = any(strcmp('forceChunking', varargin));

if iscell(data)
assert(iscellstr(data), 'NWB:MapData:NonCellStr', ['Cell arrays must be ' ...
'cell arrays of character vectors. Cell arrays of other types are ' ...
'not supported.']);
end
tid = io.getBaseType(class(data));

% max size is always unlimited
Expand Down

0 comments on commit cd2baec

Please sign in to comment.