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 2222
2323names = string .empty ;
2424
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
2633
2734ds = finf .Datasets ;
2835
Original file line number Diff line number Diff line change @@ -91,11 +91,12 @@ function test_get_variables(tc)
9191tc .verifyEqual(sort(v ), [" x" , " y" ])
9292
9393% traversal
94- v = h5variables(basic , " /j" );
95- tc .verifyEmpty(v )
94+ tc .verifyEmpty( h5variables(basic , " /j" ) )
9695
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" )
99100
100101end
101102
You can’t perform that action at this time.
0 commit comments