From ef43e87e2377e74d712af4e035f180434f5ede46 Mon Sep 17 00:00:00 2001 From: Lawrence Niu Date: Tue, 6 Sep 2022 14:22:06 -0400 Subject: [PATCH] Add check for non-cellstr cell types --- +io/mapData2H5.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/+io/mapData2H5.m b/+io/mapData2H5.m index 3287e9a7..41a1b363 100644 --- a/+io/mapData2H5.m +++ b/+io/mapData2H5.m @@ -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