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_) extern(C) @nogc nothrowRegisters a new error class.
fnherr_t H5Eunregister_class(hid_t class_id) extern(C) @nogc nothrowUnregisters an error class.
fnherr_t H5Eclose_msg(hid_t err_id) extern(C) @nogc nothrowCloses an error message.
fnhid_t H5Ecreate_msg(hid_t cls, H5E_type_t msg_type, const char * msg) extern(C) @nogc nothrowCreates a new error message.
fnhid_t H5Ecreate_stack() extern(C) @nogc nothrowCreates a new, empty error stack.
fnhid_t H5Eget_current_stack() extern(C) @nogc nothrowGets 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) extern(C) @nogc nothrowAppends one error stack to another.
fnherr_t H5Eclose_stack(hid_t stack_id) extern(C) @nogc nothrowCloses an error stack.
fnssize_t H5Eget_class_name(hid_t class_id, char * name, size_t size) extern(C) @nogc nothrowGets the name of an error class.
fnherr_t H5Eset_current_stack(hid_t err_stack_id) extern(C) @nogc nothrowSets 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, ...) extern(C) @nogc nothrowPushes a new error onto an error stack.
fnherr_t H5Epop(hid_t err_stack, size_t count) extern(C) @nogc nothrowRemoves errors from the error stack.
fnherr_t H5Eprint2(hid_t err_stack, FILE * stream) extern(C) @nogc nothrowPrints 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) extern(C) @nogc nothrowWalks the error stack, calling a callback for each error.
fnherr_t H5Eget_auto2(hid_t estack_id, H5E_auto2_t * func, void * * client_data) extern(C) @nogc nothrowGets the current automatic error reporting settings.
fnherr_t H5Eset_auto2(hid_t estack_id, H5E_auto2_t func, void * client_data) extern(C) @nogc nothrowSets automatic error reporting.
fnherr_t H5Eclear2(hid_t err_stack) extern(C) @nogc nothrowClears the error stack.
fnherr_t H5Eauto_is_v2(hid_t err_stack, uint * is_stack) extern(C) @nogc nothrowChecks 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) extern(C) @nogc nothrowGets an error message.
fnssize_t H5Eget_num(hid_t error_stack_id) extern(C) @nogc nothrowGets the number of errors in an error stack.
fnherr_t H5Eclear1() extern(C) @nogc nothrowClears the error stack (version 1, deprecated).
fnherr_t H5Eget_auto1(H5E_auto1_t * func, void * * client_data) extern(C) @nogc nothrowGets the current automatic error reporting settings (version 1, deprecated).
fnchar * H5Eget_major(hid_t maj) extern(C) @nogc nothrowGets a major error message (deprecated).
fnchar * H5Eget_minor(hid_t min) extern(C) @nogc nothrowGets a minor error message (deprecated).
fnhtri_t H5Eis_paused(hid_t err_stack) extern(C) @nogc nothrowChecks if automatic error reporting is paused.
fnherr_t H5Epause_stack(hid_t err_stack) extern(C) @nogc nothrowPauses automatic error reporting.
fnherr_t H5Eprint1(FILE * stream) extern(C) @nogc nothrowPrints 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) extern(C) @nogc nothrowPushes a new error onto the default error stack (version 1, deprecated).
fnherr_t H5Eresume_stack(hid_t err_stack) extern(C) @nogc nothrowResumes automatic error reporting after a pause.
fnherr_t H5Eset_auto1(H5E_auto1_t func, void * client_data) extern(C) @nogc nothrowSets automatic error reporting (version 1, deprecated).
fnherr_t H5Ewalk1(H5E_direction_t direction, H5E_walk1_t func, void * client_data) extern(C) @nogc nothrowWalks 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.