File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change 1818 h5info(file , variable );
1919 exists = true ;
2020catch e
21- if stdlib .isoctave
22- disp(e .message )
23- if strcmp(e .identifier , " Octave:undefined-function" ) || isempty(strfind(e .message , ' does not exist' ))
24- rethrow(e )
25- end
26- else
27- if ~strcmp(e .identifier , ' MATLAB:imagesci:h5info:unableToFind' )
28- rethrow(e )
29- end
21+ if ~strcmp(e .identifier , ' MATLAB:imagesci:h5info:unableToFind' ) && ...
22+ ~strncmp(e .message , " h5info: location" , 16 )
23+ disp(e )
24+ rethrow(e )
3025 end
3126end
3227
3833% ! ds = '/a';
3934% ! h5create(fn, ds, [1])
4035% ! assert(h5exists(fn, ds))
36+ % ! assert(!h5exists(fn, '/b'))
4137% ! delete(fn)
Original file line number Diff line number Diff line change 1919 exists = true ;
2020catch e
2121 if ~strcmp(e .identifier , " MATLAB:imagesci:netcdf:badLocationString" ) && ...
22- ~strcmp(e .identifier , " MATLAB:imagesci:netcdf:unknownLocation" )
22+ ~strcmp(e .identifier , " MATLAB:imagesci:netcdf:unknownLocation" ) && ...
23+ ~strcmp(e .message , " NetCDF: Variable not found" )
2324
2425 rethrow(e )
2526 end
3435% ! ds = 'a';
3536% ! nccreate(fn, ds)
3637% ! assert(ncexists(fn, ds))
38+ % ! assert(!ncexists(fn, 'b'))
3739% ! delete(fn)
You can’t perform that action at this time.
0 commit comments