Page tree

The license could not be verified: License Certificate has expired!

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »









Returns the settings for the automatic error stack traversal function and its data.


H5E_GET_AUTO2(estack_id, func, client_data)


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

hid_t estack_id     IN: Error stack identifier. H5E_DEFAULT indicates the current stack.
H5E_auto2_t * funcOUT: The function currently set to be called upon an error condition.
void **client_data    OUT: Data currently set to be passed to the error function.


H5Eget_auto2 returns the settings for the automatic error stack traversal function, func, and its data, client_data, that are associated with the error stack specified by estack_id.

Either or both of the func and client_data arguments may be null, in which case the value is not returned.

The library initializes its default error stack traversal functions to H5Eprint1 and H5Eprint2. A call to H5Eget_auto2 returns H5Eprint2 or the user-defined function passed in through H5Eset_auto2. A call to H5Eget_auto1 returns H5Eprint1 or the user-defined function passed in throughH5Eset_auto1. However, if the application passes in a user-defined function through H5Eset_auto1, it should call H5Eget_auto1 to query the traversal function. If the application passes in a user-defined function through H5Eset_auto2, it should call H5Eget_auto2 to query the traversal function.

Mixing the new style and the old style functions will cause a failure. For example, if the application sets a user-defined old-style traversal function through H5Eset_auto1, a call to H5Eget_auto2 will fail and will indicate that the application has mixed H5Eset_auto1 and H5Eget_auto2. On the other hand, mixing H5Eset_auto2 and H5Eget_auto1 will also cause a failure. But if the traversal functions are the library’s default H5Eprint1 or H5Eprint2, mixing H5Eset_auto1 and H5Eget_auto2 or mixing H5Eset_auto2 and H5Eget_auto1 does not fail.


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


examples / h5_subset.c [32:42]  1.10/master  HDFFV/hdf5
main (void)
    hsize_t     dims[2], dimsm[2];   
    int         data[DIM0][DIM1];           /* data to write */
    int         sdata[DIM0_SUB][DIM1_SUB];  /* subset to write */
    int         rdata[DIM0][DIM1];          /* buffer for read */
    hid_t       file_id, dataset_id;        /* handles */
    hid_t       dataspace_id, memspace_id; 


     USE HDF5 ! This module contains all necessary modules


     CHARACTER(LEN=11), PARAMETER :: filename = "compound.h5" ! File name
     CHARACTER(LEN=8), PARAMETER :: dsetname = "Compound"     ! Dataset name
     INTEGER, PARAMETER :: dimsize = 6 ! Size of the dataset

     INTEGER(HID_T) :: file_id       ! File identifier

c++ / examples / create.cpp [33:43]  1.10/master  HDFFV/hdf5
int main (void)
    * Data initialization.
   int i, j;
   int data[NX][NY];          // buffer for data to write
   for (j = 0; j < NX; j++)
      for (i = 0; i < NY; i++)

public class H5Ex_D_Chunk {
    private static String FILENAME = "H5Ex_D_Chunk.h5";
    private static String DATASETNAME = "DS1";
    private static final int DIM_X = 6;
    private static final int DIM_Y = 8;
    private static final int CHUNK_X = 4;
    private static final int CHUNK_Y = 4;
    private static final int RANK = 2;
    private static final int NDIMS = 2;

Release    C
1.8.0Function introduced in this release.

--- Last Modified: November 07, 2017 | 09:28 AM