Page tree









Turns automatic error printing on or off


H5E_SET_AUTO1(func, client_data)


herr_t H5Eset_auto1( H5E_auto1_t func, void *client_data )

SUBROUTINE h5eset_auto_f(printflag, hdferr)
  INTEGER, INTENT(IN) :: printflag  !flag to turn automatic error
                                    !printing on or off
                                    !possible values are:
                                    !printon (1)
  INTEGER, INTENT(OUT) :: hdferr    ! Error code

END SUBROUTINE h5eset_auto_f

H5E_auto1_t funcIN: Function to be called upon an error condition
void *client_data    IN: Data passed to the error function


H5E_SET_AUTO1 turns on or off automatic printing of errors. When turned on (non-null func pointer), any API function which returns an error indication will first call func, passing it client_data as an argument.

When the library is first initialized the auto printing function is set to H5E_PRINT1 (cast appropriately) and client_data is the standard error stream pointer, stderr.

Automatic stack traversal is always in the H5E_WALK_DOWNWARD direction.

For C++ Developers using C Functions:

If a C routine that takes a function pointer as an argument is called from within C++ code, the C routine should be returned from normally.

Examples of this kind of routine include callbacks such as H5P_SET_ELINK_CB and H5P_SET_TYPE_CONV_CB and functions such as H5T_CONVERT and H5E_WALK2.

Exiting the routine in its normal fashion allows the HDF5 C library to clean up its work properly. In other words, if the C++ application jumps out of the routine back to the C++ “catch” statement, the library is not given the opportunity to close any temporary data structures that were set up when the routine was called. The C++ application should save some state as the routine is started so that any problem that occurs might be diagnosed.


Returns a non-negative value if successful; otherwise returns a negative value. 


Coming Soon!

Release    C
1.8.0Function H5Eset_auto renamed to H5Eset_auto1 and deprecated in this release.

--- Last Modified: April 13, 2018 | 02:16 PM