Hi Allen, everyone,
As I understand it, you implement exactly what I suggest in my previous
message - your stack walking function "walk_error_callback" stores the
error numbers in a structure, which get turned into strings later. You
don't actually call H5Eget_msg inside the walk callback, but rather after
traversal is complete in "h5libraryError".

To clarify, it looks like calling H5Eget_msg *inside *the walk callback
corrupts the stack, but to my knowledge this is not documented anywhere and
is somewhat confusing behaviour. Perhaps H5Eget_msg could be changed to
have different error-handling behaviour, or the documentation should be
updated to explicitly point out it should not be used inside a stack
traversal.

More generally, would it be correct to say that the walk callback should
call *no *HDF5 function during traversal to ensure the problem does not
arise?

Cheers,
Martijn

On 25 March 2014 03:02, Allen Byrne <[email protected]> wrote:

> We have used the H5E functions successfully in the hdf-java native library.
> Also our java unit tests for the H5E functions could be useful.
>
>  Attached is the source for error handling in java.
>
> Allen
>
> On Monday, March 24, 2014 11:03:31 AM Андрей Парамонов wrote:
> > 24.03.2014 11:00, Martijn Jasperse пишет:
> > > Hi all,
> > >
> > >  From my experience, you cannot call H5Eget_msg while traversing the
> > >
> > > error stack as (I think) this causes the stack to be reset. This
> > > invalidates the current traversal and produces rubbish data after that
> > > point. I have seen exactly the same behaviour in C with
> > > including/excluding the H5Eget_msg call - my work-around is to record
> > > the major/minor numbers for look-up after the stack traversal is
> > > complete. This is somewhat undesirable and it seems unintuitive that
> > > H5Eget_msg should fail in such a way.
> >
> > Thank you for your feedback.
> > I propose that at least
> > http://www.hdfgroup.org/HDF5/doc/H5.user/Errors.html is fixed/updated
> > then, because now it somewhat misleading.
> >
> > Best wishes,
> > Andrey Paramonov
>
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org

Reply via email to