File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 22
22
23
23
names = string .empty ;
24
24
25
- finf = h5info(file , group );
25
+ try
26
+ finf = h5info(file , group );
27
+ catch e
28
+ if e .identifier == " MATLAB:imagesci:h5info:unableToFind"
29
+ return
30
+ end
31
+ rethrow(e )
32
+ end
26
33
27
34
ds = finf .Datasets ;
28
35
Original file line number Diff line number Diff line change @@ -91,11 +91,12 @@ function test_get_variables(tc)
91
91
tc .verifyEqual(sort(v ), [" x" , " y" ])
92
92
93
93
% traversal
94
- v = h5variables(basic , " /j" );
95
- tc .verifyEmpty(v )
94
+ tc .verifyEmpty( h5variables(basic , " /j" ) )
96
95
97
- v = h5variables(basic , " /j/a" );
98
- tc .verifyEqual(v , " b" )
96
+ % non-existant group
97
+ tc .verifyEmpty( h5variables(basic , " /nothere" ) )
98
+
99
+ tc .verifyEqual( h5variables(basic , " /j/a" ) , " b" )
99
100
100
101
end
101
102
You can’t perform that action at this time.
0 commit comments