Page tree

 

JAVA

FORTRAN

C++

C

 

Link

H5E_SET_AUTO2

Turns automatic error printing on or off

Procedure:

H5E_SET_AUTO2(estack_id, func, client_data)

Signature:

herr_t H5Eset_auto2( hid_t estack_id, H5E_auto2_t func, void *client_data )

  SUBROUTINE h5eset_auto_f(printflag, hdferr, estack_id, func, client_data)
    INTEGER       , INTENT(IN)            :: printflag
    INTEGER       , INTENT(OUT)           :: hdferr
    INTEGER(HID_T), INTENT(IN) , OPTIONAL :: estack_id
    TYPE(C_FUNPTR), INTENT(IN) , OPTIONAL :: func
    TYPE(C_PTR)   , INTENT(IN) , OPTIONAL :: client_data

Parameters:
hid_t estack_id    IN: Error stack identifier
H5E_auto2_t funcIN: Function to be called upon an error condition
void *client_data    IN:Data passed to the error function

Description:

H5E_SET_AUTO2 turns on or off automatic printing of errors for the error stack specified with estack_id. An estack_id value of H5E_DEFAULT indicates the current stack.

When automatic printing is turned on, by the use of a non-null func pointer, any API function which returns an error indication will first call func, passing it client_data as an argument.

func, a function compliant with the H5E_auto2_t prototype, is defined in the H5Epublic.h source code file as:

typedef herr_t (*H5E_auto2_t)(hid_t estack, void *client_data);

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

Automatic stack traversal is always in the H5E_WALK_DOWNWARD direction.

Automatic error printing is turned off with a H5E_SET_AUTO2 call with a NULL func pointer.

Returns:

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

Example:

Coming Soon!

History:
Release    Change
1.8.0Function introduced in this release.

--- Last Modified: September 04, 2019 | 10:42 AM