hdf5 icon indicating copy to clipboard operation
hdf5 copied to clipboard

Refactor error handling code to eliminate internal ID calls

Open qkoziol opened this issue 1 year ago • 3 comments

All calls to the H5I routines are now made in API routines (sometimes in FUNC_ENTER/LEAVE_* macros), except for some calls to H5E_clear_stack() within the library, but I'm planning to remove those over time.

Also, made all the library internal error messages into static const variables, instead of malloc'ing them, which means that they can just be referenced and not copied.

Several new and updated auto-generated header files were necessary to enable this.

qkoziol avatar May 01 '24 22:05 qkoziol

If we're going to check in the generated header files, we should do that for the other files as well (in a separate PR) and create a GitHub action to complain if they need to be regenerated (in another PR).

derobins avatar May 02 '24 12:05 derobins

Ah, I thought the generated H5E headers were included in the repo. I'll take them out.

qkoziol avatar May 02 '24 12:05 qkoziol

Ah, I thought the generated H5E headers were included in the repo. I'll take them out.

Removed

qkoziol avatar May 02 '24 12:05 qkoziol

Can I get some reviews on this PR? I'd like to get this change to the H5E package in, so I can work on refactoring the H5E_clear_stack() calls out of the internal library code with this refactor underneath those updates.

qkoziol avatar May 06 '24 15:05 qkoziol

My perl isn't exactly strong, but everything looks reasonable to me

Super, thanks!

qkoziol avatar May 08 '24 17:05 qkoziol