Exception provides wrappers of HDF5 error handling functions. More...
#include <H5Exception.h>
Public Member Functions | |
Exception (const H5std_string &func_name, const H5std_string &message=DEFAULT_MSG) | |
Creates an exception with the name of the function, in which the failure occurs, and an optional detailed message. More... | |
H5std_string | getMajorString (hid_t err_major_id) const |
Returns a text string that describes the error specified by a major error number. More... | |
H5std_string | getMinorString (hid_t err_minor_id) const |
Returns a text string that describes the error specified by a minor error number. More... | |
H5std_string | getDetailMsg () const |
Returns the detailed message set at the time the exception is thrown. More... | |
const char * | getCDetailMsg () const |
Returns the detailed message set at the time the exception is thrown. More... | |
H5std_string | getFuncName () const |
Returns the name of the function, where the exception is thrown. More... | |
const char * | getCFuncName () const |
Returns the name of the function, where the exception is thrown. More... | |
virtual void | printError (FILE *stream=NULL) const |
Exception () | |
Default constructor. More... | |
Exception (const Exception &orig) | |
Copy constructor: makes a copy of the original Exception object. More... | |
virtual | ~Exception () throw () |
Noop destructor. More... | |
Static Public Member Functions | |
static void | setAutoPrint (H5E_auto2_t &func, void *client_data) |
Turns on the automatic error printing. More... | |
static void | dontPrint () |
Turns off the automatic error printing from the C library. More... | |
static void | getAutoPrint (H5E_auto2_t &func, void **client_data) |
Retrieves the current settings for the automatic error stack traversal function and its data. More... | |
static void | clearErrorStack () |
Clears the error stack for the current thread. More... | |
static void | walkErrorStack (H5E_direction_t direction, H5E_walk2_t func, void *client_data) |
Walks the error stack for the current thread, calling the specified function. More... | |
static void | printErrorStack (FILE *stream=stderr, hid_t err_stack=H5E_DEFAULT) |
Prints the error stack in a default manner. More... | |
Static Protected Attributes | |
static const char | DEFAULT_MSG [] = "No detailed information provided" |
Many classes are derived from Exception for specific HDF5 C interfaces.
H5::Exception::Exception | ( | const H5std_string & | func, |
const H5std_string & | message = DEFAULT_MSG |
||
) |
func | - IN: Name of the function where failure occurs |
message | - IN: Message on the failure |
H5::Exception::Exception | ( | ) |
Referenced by clearErrorStack(), dontPrint(), getAutoPrint(), printErrorStack(), setAutoPrint(), and walkErrorStack().
|
virtual |
|
static |
H5Eprint
). References Exception().
|
static |
References Exception().
|
static |
func | - OUT: Current setting for the function to be called upon an error condition |
client_data | - OUT: Current setting for the data passed to the error function |
References Exception().
const char * H5::Exception::getCDetailMsg | ( | ) | const |
char
pointer const char * H5::Exception::getCFuncName | ( | ) | const |
char
pointer H5std_string H5::Exception::getDetailMsg | ( | ) | const |
H5std_string
Referenced by H5::PropList::copy(), H5::DataSpace::copy(), H5::DataType::copy(), H5::AbstractDs::getArrayType(), H5::AbstractDs::getCompType(), H5::AbstractDs::getDataType(), H5::AbstractDs::getEnumType(), H5::Attribute::getFileName(), H5::H5Location::getFileName(), H5::AbstractDs::getFloatType(), H5::AbstractDs::getIntType(), H5::CompType::getMemberArrayType(), H5::CompType::getMemberCompType(), H5::CompType::getMemberDataType(), H5::CompType::getMemberEnumType(), H5::CompType::getMemberFloatType(), H5::CompType::getMemberIntType(), H5::CompType::getMemberStrType(), H5::CompType::getMemberVarLenType(), H5::H5Location::getObjType(), H5::H5Location::getRefObjType(), H5::H5Location::getRegion(), H5::AbstractDs::getStrType(), H5::AbstractDs::getTypeClass(), H5::AbstractDs::getVarLenType(), H5::H5File::openFile(), H5::ArrayType::operator=(), H5::IdComponent::operator=(), H5::H5Location::reference(), H5::H5File::reOpen(), H5::Attribute::~Attribute(), H5::DataSet::~DataSet(), H5::DataSpace::~DataSpace(), H5::DataType::~DataType(), H5::Group::~Group(), H5::H5File::~H5File(), and H5::PropList::~PropList().
H5std_string H5::Exception::getFuncName | ( | ) | const |
H5std_string
H5std_string H5::Exception::getMajorString | ( | hid_t | err_major | ) | const |
err_major | - IN: Major error number |
H5std_string H5::Exception::getMinorString | ( | hid_t | err_minor | ) | const |
err_minor | - IN: Minor error number |
|
virtual |
References printErrorStack().
|
static |
stream | - IN: File pointer, default to stderr |
err_stack | - IN: Error stack ID, default to H5E_DEFAULT(0) |
References Exception().
Referenced by printError().
|
static |
func | - IN: Function to be called upon an error condition |
client_data | - IN: Data passed to the error function |
H5Eprint
and client_data is the standard error stream pointer, stderr
. Automatic stack traversal is always in the H5E_WALK_DOWNWARD
direction. References Exception().
|
static |
direction | - IN: Direction in which the error stack is to be walked |
func | - IN: Function to be called for each error encountered |
client_data | - IN: Data passed to the error function |
H5E_WALK_UPWARD
- begin with the most specific error and end at the API H5E_WALK_DOWNWARD
- begin at the API and end at the inner-most function where the error was first detected H5E_walk_t
prototype is as follows: References Exception().
|
staticprotected |
The HDF Group Help Desk: |
Copyright by
The HDF Group
and the Board of Trustees of the University of Illinois |