diff --git a/src/api/error.jl b/src/api/error.jl index 5f698c55..7b5b4d92 100644 --- a/src/api/error.jl +++ b/src/api/error.jl @@ -14,11 +14,11 @@ macro h5error(msg) # functions, which would clear the error stack. quote err_id = h5e_get_current_stack() - if h5e_get_num(err_id) > 0 + #if h5e_get_num(err_id) > 0 throw(H5Error($(esc(msg)), err_id)) - else - h5e_close_stack(err_id) - end + #else + # h5e_close_stack(err_id) + #end end end diff --git a/src/api/functions.jl b/src/api/functions.jl index 48220830..a68ada19 100644 --- a/src/api/functions.jl +++ b/src/api/functions.jl @@ -354,11 +354,11 @@ See `libhdf5` documentation for [`H5Aiterate2`](https://docs.hdfgroup.org/hdf5/v """ function h5a_iterate(obj_id, idx_type, order, n, op, op_data) lock(liblock) - var"#status#" = #try + var"#status#" = try ccall((:H5Aiterate2, libhdf5), herr_t, (hid_t, Cint, Cint, Ptr{hsize_t}, Ptr{Cvoid}, Any), obj_id, idx_type, order, n, op, op_data) - #finally + finally unlock(liblock) - #end + end # @show var"#status#" var"#status#" < herr_t(0) && @h5error(string("Error iterating attributes in object ", h5i_get_name(obj_id))) return nothing