Functions

H5_core_errorhandling

Functions

h5_err_t h5_set_debuglevel (const h5_id_t level)
h5_id_t h5_get_debuglevel (void)
h5_err_t h5_set_errorhandler (const h5_errorhandler_t handler)
h5_errorhandler_t h5_get_errorhandler (void)
h5_err_t h5_get_errno (const h5_file_t *const f)
void h5_set_errno (h5_file_t *const f, const h5_err_t errno)
h5_err_t h5_report_errorhandler (const h5_file_t *const f, const char *fmt, va_list ap)
h5_err_t h5_abort_errorhandler (const h5_file_t *const f, const char *fmt, va_list ap)
h5_err_t h5_error (h5_file_t *const f, const h5_err_t __errno, const char *fmt,...)
void h5_verror (const h5_file_t *const f, const char *fmt, va_list ap)
void h5_vwarn (const h5_file_t *const f, const char *fmt, va_list ap)
void h5_warn (const h5_file_t *const f, const char *fmt,...)
void h5_vinfo (const h5_file_t *const f, const char *fmt, va_list ap)
void h5_info (const h5_file_t *const f, const char *fmt,...)
void h5_vdebug (const h5_file_t *const f, const char *fmt, va_list ap)
void h5_debug (const h5_file_t *const f, const char *fmt,...)
void h5_set_funcname (h5_file_t *const f, const char *const fname)
const char * h5_get_funcname (const h5_file_t *const f)

Function Documentation

h5_err_t h5_set_debuglevel ( const h5_id_t  level )

Set debug/verbosity level. On level 0 all output will be supressed (even error messages). On level 1 error messages, on level 2 warning messages and on level 3 informational messages will be printed. On level 4 debug messages will be printed.

Values less than 0 are equivalent to 0. Values greater than 4 are equivalent to 4.

Returns:
H5_SUCCESS on success.
H5_ERR_INVAL if debug level is invalid.
Parameters:
leveldebug level
h5_id_t h5_get_debuglevel ( void   )

Get current debug/verbosity level.

Returns:
current debug level
h5_err_t h5_set_errorhandler ( const h5_errorhandler_t  handler )

Set own error handler.

Returns:
H5_SUCCESS
h5_errorhandler_t h5_get_errorhandler ( void   )

Return pointer to current error handler.

Returns:
H5_SUCCESS
h5_err_t h5_get_errno ( const h5_file_t *const   f )

Get current error number.

Returns:
H5_SUCCESS
void h5_set_errno ( h5_file_t *const   f,
const h5_err_t  errno 
)

Set error number.

Returns:
H5_SUCCESS
h5_err_t h5_report_errorhandler ( const h5_file_t *const   f,
const char *  fmt,
va_list  ap 
)

This is the H5 default error handler. If an error occures, the error message will be printed, if debug level is greater than 0.

Returns:
f->__errno
h5_err_t h5_abort_errorhandler ( const h5_file_t *const   f,
const char *  fmt,
va_list  ap 
)

If an error occures, the error message will be printed and the program exists with the error code given in f->__errno.

h5_err_t h5_error ( h5_file_t *const   f,
const h5_err_t  __errno,
const char *  fmt,
  ... 
)

Print error message via error handler.

Returns:
f->__errno
void h5_verror ( const h5_file_t *const   f,
const char *  fmt,
va_list  ap 
)

Print error message to stderr. For use in error handlers only.

void h5_vwarn ( const h5_file_t *const   f,
const char *  fmt,
va_list  ap 
)

Print a warning message to stderr.

void h5_warn ( const h5_file_t *const   f,
const char *  fmt,
  ... 
)

Print a warning message to stderr.

void h5_vinfo ( const h5_file_t *const   f,
const char *  fmt,
va_list  ap 
)

Print an informational message to stdout.

void h5_info ( const h5_file_t *const   f,
const char *  fmt,
  ... 
)

Print an informational message to stdout.

void h5_vdebug ( const h5_file_t *const   f,
const char *  fmt,
va_list  ap 
)

Print a debug message to stdout.

void h5_debug ( const h5_file_t *const   f,
const char *  fmt,
  ... 
)

Print a debug message to stdout.

void h5_set_funcname ( h5_file_t *const   f,
const char *const   fname 
)

Set function name. This name will used as prefix to all message.

const char* h5_get_funcname ( const h5_file_t *const   f )

Get function name.