H5E_CLEAR2 clears the error stack specified by
estack_id, or, if
estack_id is set to
H5E_DEFAULT, the error stack for the current thread.
estack_id is an error stack identifier, such as that returned by H5E_GET_CURRENT_STACK.
The current error stack is also cleared whenever an API function is called, with certain exceptions (for instance, H5E_PRINT1 or H5E_PRINT2).