Hi Jason,

> I'm pondering improved error handling in my LabVIEW interface to HDF5, and
> I'm wondering if there are any guarantees to be had on HDF5s error codes. I
> note that the major and minor error codes are simply sequential numbers ored
> with 0x0C000000.
>
> The question: is there any guaranteed that the symbol -> number mapping
> (e.g. H5E_CANTALLOC -> 0x0C000nnn) will remain constant from version to
> version of the toolkit, or even from one person's build to another? As far
> as I can tell, the answer is "no," but I'm hoping its "yes."

I'm not a core HDF developer, but my impression is that in HDF5 1.8.X
the "error codes" are now actually HDF5 identifiers, which are
initialized when the library starts up.  So the exact values are
presumably not guaranteed to be the same even across program launches.

In the h5py library, we build a dictionary mapping the error codes to
Python exception classes when the Python module is imported.  You
could do something similar, for example populating a C array with the
error codes and then indexing into it to find a particular value.

Andrew

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

Reply via email to