![]() |
HDF5
1.13.0
|
Error Interface. More...
Functions | |
herr_t | H5Eauto_is_v2 (hid_t estack_id, unsigned *is_stack) |
[H5E_auto2_t_snip] More... | |
herr_t | H5Eclear2 (hid_t estack_id) |
Clears the specified error stack or the error stack for the current thread. More... | |
herr_t | H5Eclose_msg (hid_t err_id) |
Closes an error message identifier. More... | |
herr_t | H5Eclose_stack (hid_t estack_id) |
Closes object handle for error stack. More... | |
hid_t | H5Ecreate_msg (hid_t cls, H5E_type_t msg_type, const char *msg) |
Adds major error message to an error class. More... | |
hid_t | H5Ecreate_stack (void) |
Creates a new empty error stack. More... | |
herr_t | H5Eget_auto2 (hid_t estack_id, H5E_auto2_t *func, void **client_data) |
Returns the settings for the automatic error stack traversal function and its data. More... | |
ssize_t | H5Eget_class_name (hid_t class_id, char *name, size_t size) |
Retrieves error class name. More... | |
hid_t | H5Eget_current_stack (void) |
Returns a copy of the current error stack. More... | |
ssize_t | H5Eget_msg (hid_t msg_id, H5E_type_t *type, char *msg, size_t size) |
Retrieves an error message. More... | |
ssize_t | H5Eget_num (hid_t estack_id) |
Retrieves the number of error messages in an error stack. More... | |
herr_t | H5Epop (hid_t estack_id, size_t count) |
Close an error message identifier. More... | |
herr_t | H5Eprint2 (hid_t estack_id, FILE *stream) |
Prints the specified error stack in a default manner. More... | |
herr_t | H5Epush2 (hid_t estack_id, const char *file, const char *func, unsigned line, hid_t cls_id, hid_t maj_id, hid_t min_id, const char *msg,...) |
Pushes new error record onto error stack. More... | |
hid_t | H5Eregister_class (const char *cls_name, const char *lib_name, const char *version) |
Registers a client library or application program to the HDF5 error API. More... | |
herr_t | H5Eset_auto2 (hid_t estack_id, H5E_auto2_t func, void *client_data) |
Turns automatic error printing on or off. More... | |
herr_t | H5Eset_current_stack (hid_t estack_id) |
Replaces the current error stack. More... | |
herr_t | H5Eunregister_class (hid_t class_id) |
Removes an error class. More... | |
herr_t | H5Ewalk2 (hid_t estack_id, H5E_direction_t direction, H5E_walk2_t func, void *client_data) |
Walks the specified error stack, calling the specified function. More... | |
herr_t | H5Eclear1 (void) |
[H5E_auto1_t_snip] More... | |
herr_t | H5Eget_auto1 (H5E_auto1_t *func, void **client_data) |
Returns the settings for the automatic error stack traversal function and its data. More... | |
herr_t | H5Eprint1 (FILE *stream) |
Prints the specified error stack in a default manner. More... | |
herr_t | H5Epush1 (const char *file, const char *func, unsigned line, H5E_major_t maj_id, H5E_minor_t min_id, const char *msg) |
Pushes new error record onto error stack. More... | |
herr_t | H5Eset_auto1 (H5E_auto1_t func, void *client_data) |
Turns automatic error printing on or off. More... | |
herr_t | H5Ewalk1 (H5E_direction_t direction, H5E_walk1_t func, void *client_data) |
Walks the specified error stack, calling the specified function. More... | |
Error Interface.
[H5E_auto2_t_snip]
Determines type of the error stack
[in] | estack_id | Error stack identifier |
[out] | is_stack | Flag indicating version the error stack conforms to |
H5Eauto_is_v2() determines whether the error auto reporting function for the error stack estack_id
conforms to the H5E_auto2_t version or the H5E_auto1_t version.
is_stack
is set to 1 if the error stack conforms to H5E_auto2_t and 0 if it conforms to H5E_auto1_t.
herr_t H5Eclear1 | ( | void | ) |
[H5E_auto1_t_snip]
Clears the error stack for the current thread
H5Eclear1() clears the error stack for the current thread.
The current error stack is also cleared whenever an API function is called, with some exceptions, for instance, H5Eprint1().
Clears the error stack for the current thread
H5Eclear1() clears the error stack for the current thread.
The current error stack is also cleared whenever an API function is called, with some exceptions, for instance, H5Eprint1().
Clears the specified error stack or the error stack for the current thread.
[in] | estack_id | Error stack identifier |
H5Eclear2() clears the error stack specified by estack_id
, or, the error stack for the current thread if estack_id
is set to H5E_DEFAULT.
The current error stack is also cleared whenever an API function is called, with some exceptions, for instance, H5Eprint1() or H5Eprint2().
Closes an error message identifier.
[in] | err_id | Error message identifier |
H5Eclose_msg() closes an error message identifier, which can be either a major or minor message.
Closes object handle for error stack.
[in] | estack_id | Error stack identifier |
H5Eclose_stack() closes the object handle for an error stack and releases its resources. H5E_DEFAULT cannot be closed.
hid_t H5Ecreate_msg | ( | hid_t | cls, |
H5E_type_t | msg_type, | ||
const char * | msg | ||
) |
Adds major error message to an error class.
[in] | cls | Error class identifier |
[in] | msg_type | Type of the error message |
[in] | msg | Major error message |
H5Ecreate_msg() adds an error message to an error class defined by client library or application program. The error message can be either major or minor which is indicated by msg_type
.
Use H5Eclose_msg() to close the message identifier returned by this function.
Valid values of msg_type
are H5E_MAJOR and H5E_MINOR.
hid_t H5Ecreate_stack | ( | void | ) |
Creates a new empty error stack.
H5Ecreate_stack() creates a new empty error stack and returns the new stack’s identifier.
Use H5Eclose_stack() to close the error stack identifier returned by this function.
herr_t H5Eget_auto1 | ( | H5E_auto1_t * | func, |
void ** | client_data | ||
) |
Returns the settings for the automatic error stack traversal function and its data.
[out] | func | The function currently set to be called upon an error condition |
[out] | client_data | 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
. 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 through H5Eset_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.
[out] | func | The function currently set to be called upon an error condition |
[out] | client_data | 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
. 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 through H5Eset_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.
herr_t H5Eget_auto2 | ( | hid_t | estack_id, |
H5E_auto2_t * | func, | ||
void ** | client_data | ||
) |
Returns the settings for the automatic error stack traversal function and its data.
[in] | estack_id | Error stack identifier |
[out] | func | The function currently set to be called upon an error condition |
[out] | client_data | 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 through H5Eset_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.
Retrieves error class name.
[in] | class_id | Error class identifier |
[out] | name | Name of the class to be queried |
[in] | size | Length of the class name to be returned |
H5Eget_class_name() retrieves the name of the error class specified by class_id
. If non-NULL pointer is passed in for name
and size
is greater than zero, the class name of size
long is returned. The length of the error class name is also returned. If NULL is passed in as name
, only the length of class name is returned. If zero is returned, it means no name. User is responsible for allocated large enough buffer for the name.
hid_t H5Eget_current_stack | ( | void | ) |
Returns a copy of the current error stack.
H5Eget_current_stack() copies the current error stack and returns an error stack identifier for the new copy.
ssize_t H5Eget_msg | ( | hid_t | msg_id, |
H5E_type_t * | type, | ||
char * | msg, | ||
size_t | size | ||
) |
Retrieves an error message.
[in] | msg_id | Identifier for error message to be queried |
[out] | type | Type of the error message |
[out] | msg | Error message buffer |
[in] | size | Length of error message to be returned |
H5Eget_msg() retrieves the error message including its length and type. The error message is specified by msg_id
. User is responsible for passing in large enough buffer for the message. If msg
is not NULL and size
is greater than zero, the error message of size
long is returned. The length of the message is also returned. If NULL is passed in as msg
, only the length and type of the message is returned. If the return value is zero, it means no message.
Valid values for type
are H5E_MAJOR and H5E_MINOR.
Retrieves the number of error messages in an error stack.
[in] | estack_id | Error stack identifier |
H5Eget_num() returns the number of error records in the error stack specified by estack_id
(including major, minor messages and description).
Close an error message identifier.
[in] | estack_id | Error stack identifier |
[in] | count | The number of error messages to be deleted from the top of error stack |
H5Epop() deletes count
records from the top of the error stack estack_id
(including major, minor messages and description).
herr_t H5Eprint1 | ( | FILE * | stream | ) |
Prints the specified error stack in a default manner.
[in] | stream | File pointer, or stderr if NULL |
H5Eprint2() prints the error stack specified by estack_id
on the specified stream, stream
. Even if the error stack is empty, a one-line message of the following form will be printed:
A similar line will appear before the error messages of each error class stating the library name, library version number, and thread identifier.
If estack_id
is H5E_DEFAULT, the current error stack will be printed.
H5Eprint2() is a convenient function for H5Ewalk2 with a function that prints error messages. Users are encouraged to write their own more specific error handlers.
[in] | stream | File pointer, or stderr if NULL |
H5Eprint2() prints the error stack specified by estack_id
on the specified stream, stream
. Even if the error stack is empty, a one-line message of the following form will be printed:
A similar line will appear before the error messages of each error class stating the library name, library version number, and thread identifier.
If estack_id
is H5E_DEFAULT, the current error stack will be printed.
H5Eprint2() is a convenient function for H5Ewalk2 with a function that prints error messages. Users are encouraged to write their own more specific error handlers.
Prints the specified error stack in a default manner.
[in] | estack_id | Error stack identifier |
[in] | stream | File pointer, or stderr if NULL |
H5Eprint2() prints the error stack specified by estack_id
on the specified stream, stream
. Even if the error stack is empty, a one-line message of the following form will be printed:
A similar line will appear before the error messages of each error class stating the library name, library version number, and thread identifier.
If estack_id
is H5E_DEFAULT, the current error stack will be printed.
H5Eprint2() is a convenient function for H5Ewalk2 with a function that prints error messages. Users are encouraged to write their own more specific error handlers.
herr_t H5Epush1 | ( | const char * | file, |
const char * | func, | ||
unsigned | line, | ||
H5E_major_t | maj_id, | ||
H5E_minor_t | min_id, | ||
const char * | msg | ||
) |
Pushes new error record onto error stack.
[in] | file | Name of the file in which the error was detected |
[in] | func | Name of the function in which the error was detected |
[in] | line | Line number within the file at which the error was detected |
[in] | maj_id | Major error identifier |
[in] | min_id | Minor error identifier |
[in] | msg | Error description string |
H5Epush1() pushes a new error record onto the error stack for the current thread.
The error has major and minor numbers maj_id
and min_id
, the function func
where the error was detected, the name of the file file
where the error was detected, the line line
within that file, and an error description string msg
.
The function name, filename, and error description strings must be statically allocated.
msg
can be a format control string with additional arguments. This design of appending additional arguments is similar to the system and C functions printf and fprintf.
[in] | file | Name of the file in which the error was detected |
[in] | func | Name of the function in which the error was detected |
[in] | line | Line number within the file at which the error was detected |
[in] | maj_id | Major error identifier |
[in] | min_id | Minor error identifier |
[in] | msg | Error description string |
H5Epush1() pushes a new error record onto the error stack for the current thread.
The error has major and minor numbers maj_id
and min_id
, the function func
where the error was detected, the name of the file file
where the error was detected, the line line
within that file, and an error description string msg
.
The function name, filename, and error description strings must be statically allocated.
msg
can be a format control string with additional arguments. This design of appending additional arguments is similar to the system and C functions printf and fprintf.
herr_t H5Epush2 | ( | hid_t | estack_id, |
const char * | file, | ||
const char * | func, | ||
unsigned | line, | ||
hid_t | cls_id, | ||
hid_t | maj_id, | ||
hid_t | min_id, | ||
const char * | msg, | ||
... | |||
) |
Pushes new error record onto error stack.
[in] | estack_id | Error stack identifier |
[in] | file | Name of the file in which the error was detected |
[in] | func | Name of the function in which the error was detected |
[in] | line | Line number within the file at which the error was detected |
[in] | cls_id | Error class identifier |
[in] | maj_id | Major error identifier |
[in] | min_id | Minor error identifier |
[in] | msg | Error description string |
H5Epush2() pushes a new error record onto the error stack specified by estack_id
.
The error record contains the error class identifier class_id
, the major and minor message identifiers major_id
and minor_id
, the function name func
where the error was detected, the file name file
and line number line
within that file where the error was detected, and an error description msg
.
The major and minor errors must be in the same error class.
The function name, filename, and error description strings must be statically allocated.
msg
can be a format control string with additional arguments. This design of appending additional arguments is similar to the system and C functions printf and fprintf.
hid_t H5Eregister_class | ( | const char * | cls_name, |
const char * | lib_name, | ||
const char * | version | ||
) |
Registers a client library or application program to the HDF5 error API.
[in] | cls_name | Name of the error class |
[in] | lib_name | Name of the client library or application to which the error class belongs |
[in] | version | Version of the client library or application to which the error class belongs |
H5Eregister_class() registers a client library or application program to the HDF5 error API so that the client library or application program can report errors together with the HDF5 library. It receives an identifier for this error class for further error operations. The library name and version number will be printed out in the error message as a preamble.
A NULL can be passed in for version
.
herr_t H5Eset_auto1 | ( | H5E_auto1_t | func, |
void * | client_data | ||
) |
Turns automatic error printing on or off.
[in] | func | Function to be called upon an error condition |
[in] | client_data | Data passed to the error function |
H5Eset_auto2() turns on or off automatic printing of errors. When 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:
When the library is first initialized, the auto printing function is set to H5Eprint2() (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 H5Eset_auto2() call with a NULL func pointer.
[in] | func | Function to be called upon an error condition |
[in] | client_data | Data passed to the error function |
H5Eset_auto2() turns on or off automatic printing of errors. When 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:
When the library is first initialized, the auto printing function is set to H5Eprint2() (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 H5Eset_auto2() call with a NULL func pointer.
herr_t H5Eset_auto2 | ( | hid_t | estack_id, |
H5E_auto2_t | func, | ||
void * | client_data | ||
) |
Turns automatic error printing on or off.
[in] | estack_id | Error stack identifier |
[in] | func | Function to be called upon an error condition |
[in] | client_data | Data passed to the error function |
H5Eset_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:
When the library is first initialized, the auto printing function is set to H5Eprint2() (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 H5Eset_auto2() call with a NULL func pointer.
Replaces the current error stack.
[in] | estack_id | Error stack identifier |
H5Eset_current_stack() replaces the content of the current error stack with a copy of the content of the error stack specified by estack_id
, and it closes the error stack specified by estack_id
.
Removes an error class.
[in] | class_id | Error class identifier |
H5Eunregister_class() removes the error class specified by class_id
. All the major and minor errors in this class will also be closed.
herr_t H5Ewalk1 | ( | H5E_direction_t | direction, |
H5E_walk1_t | func, | ||
void * | client_data | ||
) |
Walks the specified error stack, calling the specified function.
[in] | direction | Direction in which the error stack is to be walked |
[in] | func | Function to be called for each error encountered |
[in] | client_data | Data to be passed with func |
H5Ewalk1() walks the error stack for the current thread and calls the function specified in func
for each error along the way.
direction
specifies whether the stack is walked from the inside out or the outside in. A value of H5E_WALK_UPWARD means to begin with the most specific error and end at the API; a value of H5E_WALK_DOWNWARD means to start at the API and end at the innermost function where the error was first detected.
func
will be called for each error in the error stack. Its arguments will include an index number n
(beginning at zero regardless of stack traversal direction), an error stack entry err_desc
, and the client_data
pointer passed to H5Eprint(). The H5E_walk1_t prototype is as follows:
where the parameters are described in the following table:
n | Indexed position of the error in the stack |
err_desc | Pointer to a data structure describing the error (This structure is currently described only in the source code file hdf5/src/H5Epublic.h. That file also contains the definition list of major and minor error codes; that information will eventually be presented as an appendix to this HDF5 Reference Manual.) |
client_data | Pointer to client data in the format expected by the user-defined function |
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 H5Pset_elink_cb() and H5Pset_type_conv_cb() and functions such as H5Tconvert() and H5Ewalk2(). 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.
[in] | direction | Direction in which the error stack is to be walked |
[in] | func | Function to be called for each error encountered |
[in] | client_data | Data to be passed with func |
H5Ewalk1() walks the error stack for the current thread and calls the function specified in func
for each error along the way.
direction
specifies whether the stack is walked from the inside out or the outside in. A value of H5E_WALK_UPWARD means to begin with the most specific error and end at the API; a value of H5E_WALK_DOWNWARD means to start at the API and end at the innermost function where the error was first detected.
func
will be called for each error in the error stack. Its arguments will include an index number n
(beginning at zero regardless of stack traversal direction), an error stack entry err_desc
, and the client_data
pointer passed to H5Eprint(). The H5E_walk1_t prototype is as follows:
where the parameters are described in the following table:
n | Indexed position of the error in the stack |
err_desc | Pointer to a data structure describing the error (This structure is currently described only in the source code file hdf5/src/H5Epublic.h. That file also contains the definition list of major and minor error codes; that information will eventually be presented as an appendix to this HDF5 Reference Manual.) |
client_data | Pointer to client data in the format expected by the user-defined function |
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 H5Pset_elink_cb() and H5Pset_type_conv_cb() and functions such as H5Tconvert() and H5Ewalk2(). 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.
herr_t H5Ewalk2 | ( | hid_t | estack_id, |
H5E_direction_t | direction, | ||
H5E_walk2_t | func, | ||
void * | client_data | ||
) |
Walks the specified error stack, calling the specified function.
[in] | estack_id | Error stack identifier |
[in] | direction | Direction in which the error stack is to be walked |
[in] | func | Function to be called for each error encountered |
[in] | client_data | Data to be passed with func |
H5Ewalk2() walks the error stack specified by estack_id
for the current thread and calls the function specified in func
for each error along the way.
If the value of estack_id
is H5E_DEFAULT, then H5Ewalk2() walks the current error stack.
direction
specifies whether the stack is walked from the inside out or the outside in. A value of H5E_WALK_UPWARD means to begin with the most specific error and end at the API; a value of H5E_WALK_DOWNWARD means to start at the API and end at the innermost function where the error was first detected.
func
, a function compliant with the H5E_walk2_t
prototype, will be called for each error in the error stack. Its arguments will include an index number n
(beginning at zero regardless of stack traversal direction), an error stack entry err_desc
, and the client_data
pointer passed to H5Eprint(). The H5E_walk2_t prototype is as follows:
where the parameters are described in the following table:
n | Indexed position of the error in the stack |
err_desc | Pointer to a data structure describing the error (This structure is currently described only in the source code file hdf5/src/H5Epublic.h. That file also contains the definition list of major and minor error codes; that information will eventually be presented as an appendix to this HDF5 Reference Manual.) |
client_data | Pointer to client data in the format expected by the user-defined function |
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 H5Pset_elink_cb() and H5Pset_type_conv_cb() and functions such as H5Tconvert() and H5Ewalk2(). 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.