Please, help us to better serve our user community by answering the following short survey: https://www.hdfgroup.org/website-survey/
HDF5  1.15.0.112f445
API Reference
 
Loading...
Searching...
No Matches
Fortran Error (H5E) Interface

Detailed Description

See also
Error Handling (H5E), C-API
HDF5 Error Handling, User Guide

Modules

module  h5e
 This module contains Fortran interfaces for H5E functions.
 

Functions/Subroutines

subroutine h5eclear_f (hdferr, estack_id)
 Clears the error stack for the current thread.
 
subroutine h5eprint_f (hdferr, name)
 Prints the error stack in a default manner.
 
subroutine h5eget_major_f (error_no, name, namelen, hdferr)
 Returns a character string describing an error specified by a major error number.
 
subroutine h5eget_minor_f (error_no, name, hdferr)
 Returns a character string describing an error specified by a minor error number.
 
subroutine h5eset_auto_f (printflag, hdferr, estack_id, func, client_data)
 Returns settings for automatic error stack traversal function and its data.
 
subroutine h5epush_f (err_stack, cls_id, maj_id, min_id, msg, hdferr, file, func, line, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20)
 Pushes a new error record onto an error stack.
 
subroutine h5eregister_class_f (cls_name, lib_name, version, class_id, hdferr)
 Registers a client library or application program to the HDF5 error API.
 
subroutine h5eunregister_class_f (class_id, hdferr)
 Removes an error class.
 
subroutine h5ecreate_msg_f (class_id, msg_type, msg, err_id, hdferr)
 Adds a major or minor error message to an error class.
 
subroutine h5eclose_msg_f (err_id, hdferr)
 Closes an error message.
 
subroutine h5eget_msg_f (msg_id, msg_type, msg, hdferr, msg_size)
 Retrieves an error message.
 
subroutine h5eget_num_f (error_stack_id, count, hdferr)
 Retrieves the number of error messages in an error stack.
 
subroutine h5ewalk_f (err_stack, direction, op, op_data, hdferr)
 Walks the specified error stack, calling the specified function.
 
subroutine h5eget_class_name_f (class_id, name, hdferr, size)
 Retrieves an error message.
 
subroutine h5eappend_stack_f (dst_stack_id, src_stack_id, close_source_stack, hdferr)
 Appends one error stack to another, optionally closing the source stack.
 
subroutine h5eget_current_stack_f (err_stack_id, hdferr)
 Returns a copy of the current error stack.
 
subroutine h5eset_current_stack_f (err_stack_id, hdferr)
 Replaces the current error stack.
 
subroutine h5eclose_stack_f (err_stack_id, hdferr)
 Closes an error stack handle.
 
subroutine h5ecreate_stack_f (err_stack_id, hdferr)
 Creates a new, empty error stack.
 
subroutine h5epop_f (err_stack_id, count, hdferr)
 Deletes specified number of error messages from the error stack.
 

Variables

integer(hid_th5e_default_f
 H5E_DEFAULT.
 
integer h5e_major_f
 H5E_MAJOR.
 
integer h5e_minor_f
 H5E_MINOR.
 
integer h5e_walk_upward_f
 H5E_WALK_UPWARD.
 
integer h5e_walk_downward_f
 H5E_WALK_DOWNWARD.
 

Function/Subroutine Documentation

◆ h5eappend_stack_f()

subroutine h5eappend_stack_f ( integer(hid_t), intent(in) dst_stack_id,
integer(hid_t), intent(in) src_stack_id,
logical, intent(in) close_source_stack,
integer, intent(out) hdferr )

Appends one error stack to another, optionally closing the source stack.

Parameters
dst_stack_idError stack identifier
src_stack_idError stack identifier
close_source_stackFlag to indicate whether to close the source stack
hdferrReturns 0 if successful and -1 if it fails.

See C API: H5Eappend_stack()

◆ h5eclear_f()

subroutine h5eclear_f ( integer, intent(out) hdferr,
integer(hid_t), intent(in), optional estack_id )

Clears the error stack for the current thread.

Parameters
hdferrReturns 0 if successful and -1 if it fails.
estack_idError Stack id

See C API: H5Eclear2()

◆ h5eclose_msg_f()

subroutine h5eclose_msg_f ( integer(hid_t), intent(in) err_id,
integer, intent(out) hdferr )

Closes an error message.

Parameters
err_idAn error message identifier
hdferrReturns 0 if successful and -1 if it fails.

See C API: H5Eclose_msg()

◆ h5eclose_stack_f()

subroutine h5eclose_stack_f ( integer(hid_t), intent(in) err_stack_id,
integer, intent(out) hdferr )

Closes an error stack handle.

Parameters
err_stack_idError stack identifier
hdferrReturns 0 if successful and -1 if it fails.

See C API: H5Eclose_stack()

◆ h5ecreate_msg_f()

subroutine h5ecreate_msg_f ( integer(hid_t), intent(in) class_id,
integer, intent(in) msg_type,
character(len=*), intent(in) msg,
integer(hid_t), intent(out) err_id,
integer, intent(out) hdferr )

Adds a major or minor error message to an error class.

Parameters
class_idAn error class identifier
msg_typeThe type of the error message
msgError message
err_idError identifier
hdferrReturns 0 if successful and -1 if it fails.

See C API: H5Ecreate_msg()

◆ h5ecreate_stack_f()

subroutine h5ecreate_stack_f ( integer(hid_t), intent(out) err_stack_id,
integer, intent(out) hdferr )

Creates a new, empty error stack.

Parameters
err_stack_idError stack identifier
hdferrReturns 0 if successful and -1 if it fails.

See C API: H5Ecreate_stack()

◆ h5eget_class_name_f()

subroutine h5eget_class_name_f ( integer(hid_t), intent(in) class_id,
character(len=*) name,
integer, intent(out) hdferr,
integer(size_t), intent(inout), optional size )

Retrieves an error message.

Parameters
class_idError class identifier
nameBuffer for the error class name
hdferrReturns 0 if successful and -1 if it fails.
sizeThe maximum number of characters of the class name to be returned by this function in name.

If size is omitted, the API will copy up to the length of name, and it is the application's responsibility to provide a large enough buffer. If size is zero, the required buffer size will be returned, and name is not accessed. If size is greater than zero, the function will copy up to the length of size info name.

See C API: H5Eget_class_name()

◆ h5eget_current_stack_f()

subroutine h5eget_current_stack_f ( integer(hid_t), intent(out) err_stack_id,
integer, intent(out) hdferr )

Returns a copy of the current error stack.

Parameters
err_stack_idError stack identifier
hdferrReturns 0 if successful and -1 if it fails.

See C API: H5Eget_current_stack()

◆ h5eget_major_f()

subroutine h5eget_major_f ( integer(hid_t), intent(in) error_no,
character(len=*), intent(out) name,
integer(size_t), intent(inout) namelen,
integer, intent(out) hdferr )

Returns a character string describing an error specified by a major error number.

Parameters
error_noMajor error number.
nameCharacter string describing the error.
namelenNumber of characters in the name buffer.
hdferrReturns 0 if successful and -1 if it fails.
Attention
Deprecated: use H5Eget_msg_f() instead.

See C API: H5Eget_major()

◆ h5eget_minor_f()

subroutine h5eget_minor_f ( integer(hid_t), intent(in) error_no,
character(len=*), intent(out) name,
integer, intent(out) hdferr )

Returns a character string describing an error specified by a minor error number.

Parameters
error_noMinor error number.
nameCharacter string describing the error.
hdferrReturns 0 if successful and -1 if it fails.
Attention
Deprecated: use H5Eget_msg_f() instead.

See C API: H5Eget_minor()

◆ h5eget_msg_f()

subroutine h5eget_msg_f ( integer(hid_t), intent(in) msg_id,
integer, intent(out) msg_type,
character(len=*) msg,
integer, intent(out) hdferr,
integer(size_t), intent(inout), optional msg_size )

Retrieves an error message.

Parameters
msg_idError message identifier
msg_typeThe type of the error message. Valid values are H5E_MAJOR_F and H5E_MINOR_F.
msgError message buffer
hdferrReturns 0 if successful and -1 if it fails.
msg_sizeThe length of error message to be returned by this function

If msg_size is omitted, the API will copy up to the length of msg, and it is the application's responsibility to provide a large enough buffer. If msg_size is zero, the required buffer size will be returned, and msg is not accessed. If msg_size is greater than zero, the function will copy up to the length of msg_size info msg.

See C API: H5Eget_msg()

◆ h5eget_num_f()

subroutine h5eget_num_f ( integer(hid_t), intent(in) error_stack_id,
integer(size_t), intent(out) count,
integer, intent(out) hdferr )

Retrieves the number of error messages in an error stack.

Parameters
error_stack_idAn error message identifier
countNumber of error messages in err_id
hdferrReturns 0 if successful and -1 if it fails.

See C API: H5Eget_num()

◆ h5epop_f()

subroutine h5epop_f ( integer(hid_t), intent(in) err_stack_id,
integer(size_t), intent(in) count,
integer, intent(out) hdferr )

Deletes specified number of error messages from the error stack.

Parameters
err_stack_idError stack identifier
countThe number of error messages to be deleted from the top of error stack
hdferrReturns 0 if successful and -1 if it fails.

See C API: H5Epop()

◆ h5eprint_f()

subroutine h5eprint_f ( integer, intent(out) hdferr,
character(len=*), intent(in), optional name )

Prints the error stack in a default manner.

Parameters
hdferrReturns 0 if successful and -1 if it fails.
nameName of the file that contains print output
Note
If name is not specified, the output will be sent to the standard error (stderr).
Attention
Deprecated.

See C API: H5Eprint1()

◆ h5epush_f()

subroutine h5epush_f ( integer(hid_t), intent(in) err_stack,
integer(hid_t), intent(in) cls_id,
integer(hid_t), intent(in) maj_id,
integer(hid_t), intent(in) min_id,
character(len=*), intent(in) msg,
integer, intent(out) hdferr,
type(c_ptr), optional file,
type(c_ptr), optional func,
type(c_ptr), optional line,
character(len=*), optional, target arg1,
character(len=*), optional, target arg2,
character(len=*), optional, target arg3,
character(len=*), optional, target arg4,
character(len=*), optional, target arg5,
character(len=*), optional, target arg6,
character(len=*), optional, target arg7,
character(len=*), optional, target arg8,
character(len=*), optional, target arg9,
character(len=*), optional, target arg10,
character(len=*), optional, target arg11,
character(len=*), optional, target arg12,
character(len=*), optional, target arg13,
character(len=*), optional, target arg14,
character(len=*), optional, target arg15,
character(len=*), optional, target arg16,
character(len=*), optional, target arg17,
character(len=*), optional, target arg18,
character(len=*), optional, target arg19,
character(len=*), optional, target arg20 )

Pushes a new error record onto an error stack.

Parameters
err_stackError stack identifier. If the identifier is H5E_DEFAULT_F, the error record will be pushed to the current stack.
cls_idError class identifier
maj_idMajor error identifier
min_idMinor error identifier
msgError description string
hdferrReturns 0 if successful and -1 if it fails.
fileName of the file in which the error was detected
funcName of the function in which the error was detected
lineLine number in the file where the error was detected
arg1C style format control strings
arg2C style format control strings
arg3C style format control strings
arg4C style format control strings
arg5C style format control strings
arg6C style format control strings
arg7C style format control strings
arg8C style format control strings
arg9C style format control strings
arg10C style format control strings
arg11C style format control strings
arg12C style format control strings
arg13C style format control strings
arg14C style format control strings
arg15C style format control strings
arg16C style format control strings
arg17C style format control strings
arg18C style format control strings
arg19C style format control strings
arg20C style format control strings
Note
arg[1-20] expects C-style format strings, similar to the system and C functions printf() and fprintf(). Furthermore, special characters, such as ANSI escapes, will only be interpreted correctly if the Fortran equivalent is used. For example, to print msg "TEXT" in red and has a space after the text would be:

(..., "%s TEXT %s"//c_new_line, hdferr, ..., arg1=achar(27)//"[31m", arg2=achar(27)//"[0m" )

Using "\n" instead of C_NEW_LINE will not be interpereted correctly, and similarly, using "\x1B" instead of ACHAR(27)

See C API: H5Epush2()

◆ h5eregister_class_f()

subroutine h5eregister_class_f ( character(len=*), intent(in) cls_name,
character(len=*), intent(in) lib_name,
character(len=*), intent(in) version,
integer(hid_t), intent(out) class_id,
integer, intent(out) hdferr )

Registers a client library or application program to the HDF5 error API.

Parameters
cls_nameName of the error class
lib_nameName of the client library or application to which the error class belongs
versionVersion of the client library or application to which the error class belongs. It can be NULL.
class_idClass identifier
hdferrReturns 0 if successful and -1 if it fails.

See C API: H5Eregister_class()

◆ h5eset_auto_f()

subroutine h5eset_auto_f ( 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 )

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

Parameters
printflagFlag to turn automatic error printing on or off; possible values are:
estack_idError stack identifier.
funcFunction to be called upon an error condition.
client_dataData passed to the error function.
hdferrReturns 0 if successful and -1 if it fails.

See C API: H5Eset_auto2()

◆ h5eset_current_stack_f()

subroutine h5eset_current_stack_f ( integer(hid_t), intent(in) err_stack_id,
integer, intent(out) hdferr )

Replaces the current error stack.

Parameters
err_stack_idError stack identifier
hdferrReturns 0 if successful and -1 if it fails.

See C API: H5Eset_current_stack()

◆ h5eunregister_class_f()

subroutine h5eunregister_class_f ( integer(hid_t), intent(in) class_id,
integer, intent(out) hdferr )

Removes an error class.

Parameters
class_idClass identifier
hdferrReturns 0 if successful and -1 if it fails.

See C API: H5Eunregister_class()

◆ h5ewalk_f()

subroutine h5ewalk_f ( integer(hid_t), intent(in) err_stack,
integer, intent(in) direction,
type(c_funptr), intent(in) op,
type(c_ptr), intent(inout) op_data,
integer, intent(out) hdferr )

Walks the specified error stack, calling the specified function.

Parameters
err_stackError stack identifier
directionDirection in which the error stack is to be walked
opFunction to be called for each error encountered
op_dataData to be passed to func
hdferrReturns 0 if successful and -1 if it fails.

See C API: H5Ewalk2()

Variable Documentation

◆ h5e_default_f

integer(hid_t) h5e_default_f

H5E_DEFAULT.

◆ h5e_major_f

integer h5e_major_f

H5E_MAJOR.

◆ h5e_minor_f

integer h5e_minor_f

H5E_MINOR.

◆ h5e_walk_downward_f

integer h5e_walk_downward_f

H5E_WALK_DOWNWARD.

◆ h5e_walk_upward_f

integer h5e_walk_upward_f

H5E_WALK_UPWARD.