ddn.lib.hdf5.h5e

HDF5 Error Handling Binding

This module provides D bindings for HDF5 error handling (H5E API). These functions allow managing error stacks, setting error handlers, and retrieving error information.

License

BSD-3-Clause

Types 8

enumH5E_type_t : int

Error type enumeration.

Identifies whether an error message is a major or minor error.

MAJOR = 0Major error type
MINOR = 1Minor error type
enumH5E_direction_t : int

Error stack traversal direction.

Controls the order in which errors are visited when walking the error stack.

WALK_UPWARD = 0Begin with most specific error, end at API function
WALK_DOWNWARD = 1Begin at API function, end with most specific error

Error information structure (version 1, deprecated).

Contains detailed information about a single error in the error stack. This is the older API structure; prefer H5E_error2_t for new code.

Fields
hid_t maj_numMajor error number
hid_t min_numMinor error number
const(char) * func_nameFunction in which error occurred
const(char) * file_nameFile in which error occurred
uint lineLine in file where error occurs
const(char) * descOptional supplied description

Error information structure (version 2).

Contains detailed information about a single error in the error stack.

Fields
hid_t cls_idClass ID
hid_t maj_numMajor error ID
hid_t min_numMinor error number
uint lineLine in file where error occurs
const(char) * func_nameFunction in which error occurred
const(char) * file_nameFile in which error occurred
const(char) * descOptional supplied description
aliasH5E_walk2_t = herr_t function(uint n, const(H5E_error2_t) * err_desc, void * client_data)

Error stack walk callback function type (version 2).

Parameters

nIndex of the error in the stack
err_descPointer to error description structure
client_dataUser-supplied data passed to the callback

Returns

Non-negative to continue, negative to stop walking.
aliasH5E_auto2_t = herr_t function(hid_t estack, void * client_data)

Automatic error reporting callback function type (version 2).

Parameters

estackError stack identifier
client_dataUser-supplied data passed to the callback

Returns

Non-negative on success, negative on failure.
aliasH5E_walk1_t = herr_t function(int n, H5E_error1_t * err_desc, void * client_data)

Error stack walk callback function type (version 1, deprecated).

Parameters

nIndex of the error in the stack
err_descPointer to error description structure
client_dataUser-supplied data passed to the callback

Returns

Non-negative to continue, negative to stop walking.
aliasH5E_auto1_t = herr_t function(void * client_data)

Automatic error reporting callback function type (version 1, deprecated).

Parameters

client_dataUser-supplied data passed to the callback

Returns

Non-negative on success, negative on failure.

Functions 31

fnhid_t H5Eregister_class(const char * cls_name, const char * lib_name, const char * version_)Registers a new error class.
fnherr_t H5Eunregister_class(hid_t class_id)Unregisters an error class.
fnherr_t H5Eclose_msg(hid_t err_id)Closes an error message.
fnhid_t H5Ecreate_msg(hid_t cls, H5E_type_t msg_type, const char * msg)Creates a new error message.
fnhid_t H5Ecreate_stack()Creates a new, empty error stack.
fnhid_t H5Eget_current_stack()Gets a copy of the current error stack.
fnherr_t H5Eappend_stack(hid_t dst_stack_id, hid_t src_stack_id, hbool_t close_source_stack)Appends one error stack to another.
fnherr_t H5Eclose_stack(hid_t stack_id)Closes an error stack.
fnssize_t H5Eget_class_name(hid_t class_id, char * name, size_t size)Gets the name of an error class.
fnherr_t H5Eset_current_stack(hid_t err_stack_id)Sets the current error stack.
fnherr_t H5Epush2(hid_t err_stack, const char * file, const char * func, uint line, hid_t cls_id, hid_t maj_id, hid_t min_id, const char * msg, ...)Pushes a new error onto an error stack.
fnherr_t H5Epop(hid_t err_stack, size_t count)Removes errors from the error stack.
fnherr_t H5Eprint2(hid_t err_stack, FILE * stream)Prints the error stack to a file stream.
fnherr_t H5Ewalk2(hid_t err_stack, H5E_direction_t direction, H5E_walk2_t func, void * client_data)Walks the error stack, calling a callback for each error.
fnherr_t H5Eget_auto2(hid_t estack_id, H5E_auto2_t * func, void * * client_data)Gets the current automatic error reporting settings.
fnherr_t H5Eset_auto2(hid_t estack_id, H5E_auto2_t func, void * client_data)Sets automatic error reporting.
fnherr_t H5Eclear2(hid_t err_stack)Clears the error stack.
fnherr_t H5Eauto_is_v2(hid_t err_stack, uint * is_stack)Checks if the error stack is using version 2 format.
fnssize_t H5Eget_msg(hid_t msg_id, H5E_type_t * type, char * msg, size_t size)Gets an error message.
fnssize_t H5Eget_num(hid_t error_stack_id)Gets the number of errors in an error stack.
fnherr_t H5Eclear1()Clears the error stack (version 1, deprecated).
fnherr_t H5Eget_auto1(H5E_auto1_t * func, void * * client_data)Gets the current automatic error reporting settings (version 1, deprecated).
fnchar * H5Eget_major(hid_t maj)Gets a major error message (deprecated).
fnchar * H5Eget_minor(hid_t min)Gets a minor error message (deprecated).
fnhtri_t H5Eis_paused(hid_t err_stack)Checks if automatic error reporting is paused.
fnherr_t H5Epause_stack(hid_t err_stack)Pauses automatic error reporting.
fnherr_t H5Eprint1(FILE * stream)Prints the error stack to a file stream (version 1, deprecated).
fnherr_t H5Epush1(const char * file, const char * func, uint line, hid_t maj, hid_t min, const char * str)Pushes a new error onto the default error stack (version 1, deprecated).
fnherr_t H5Eresume_stack(hid_t err_stack)Resumes automatic error reporting after a pause.
fnherr_t H5Eset_auto1(H5E_auto1_t func, void * client_data)Sets automatic error reporting (version 1, deprecated).
fnherr_t H5Ewalk1(H5E_direction_t direction, H5E_walk1_t func, void * client_data)Walks the error stack, calling a callback for each error (version 1, deprecated).

Variables 1

enumvarH5E_DEFAULT = 0

Default error stack identifier.

Used to refer to the current thread's error stack.