diff --git a/src/api/helpers.jl b/src/api/helpers.jl index 1b0fdb117..fdbb4b3c4 100644 --- a/src/api/helpers.jl +++ b/src/api/helpers.jl @@ -88,8 +88,11 @@ function h5a_iterate_helper( )::herr_t f, err_ref = data try - return herr_t(f(loc_id, attr_name, ainfo)) + ret = herr_t(f(loc_id, attr_name, ainfo)) + @async @info "h5a_iterate_helper" ret + return ret catch err + @async @info "h5a_iterate_helper got an error" err err_ref[] = err return herr_t(-1) end @@ -465,8 +468,11 @@ function h5l_iterate_helper( )::herr_t f, err_ref = data try - return herr_t(f(group, name, info)) + ret = herr_t(f(group, name, info)) + @async @info "h5l_iterate_helper" ret + return ret catch err + @async @info "h5l_iterate_helper got an error" err err_ref[] = err return herr_t(-1) end diff --git a/test/api.jl b/test/api.jl index 8c372b1dc..174df3e3a 100644 --- a/test/api.jl +++ b/test/api.jl @@ -38,11 +38,10 @@ using HDF5, Test @test names == ["a"] # Julia error - #= @test_throws AssertionError HDF5.API.h5a_iterate( f, HDF5.API.H5_INDEX_NAME, HDF5.API.H5_ITER_INC ) do loc, name, info - @assert false + throw(AssertionError("False is not true")) end # HDF5 error @@ -51,7 +50,6 @@ using HDF5, Test ) do loc, name, info return -1 end - =# end @testset "h5l_iterate" begin @@ -91,7 +89,6 @@ end end == 1 @test names == ["a"] - #= # HDF5 error @test_throws HDF5.API.H5Error HDF5.API.h5l_iterate( f, HDF5.API.H5_INDEX_NAME, HDF5.API.H5_ITER_INC @@ -103,9 +100,8 @@ end @test_throws AssertionError HDF5.API.h5l_iterate( f, HDF5.API.H5_INDEX_NAME, HDF5.API.H5_ITER_INC ) do loc, name, info - @assert false + throw(AssertionError("False is not true")) end - =# end @testset "h5dchunk_iter" begin