diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2001-03-10 03:59:46 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2001-03-10 03:59:46 (GMT) |
commit | 9cd9f7f5216fbc30b10426f5bd11e26d81668eac (patch) | |
tree | be3e4f25e5a870f8e98c7b1cfce3917a5dd19269 /c++/src/H5StrType.cpp | |
parent | cd29e12e0252ccfc969281c5dabd991b46203f05 (diff) | |
download | hdf5-9cd9f7f5216fbc30b10426f5bd11e26d81668eac.zip hdf5-9cd9f7f5216fbc30b10426f5bd11e26d81668eac.tar.gz hdf5-9cd9f7f5216fbc30b10426f5bd11e26d81668eac.tar.bz2 |
[svn-r3602]
Purpose: Usability enhancement
Description:
- Added more information about the failure to all the throw's,
i.e, member function name and more detail about the failure, where
appropriate. Also, added exception throws for private functions,
such as p_close to provide more specific details.
- Added two api functions: Exception::getFuncName() and
Exception::getCFuncName() to provide the name of the member
function where failure occurs.
- Fixed some typos, one of which caused segn. fault in some
situations (resetIdComponent was accidentally called twice
in a couple of places :)
Platforms:
arabica (sparc-sun-solaris 2.7)
Diffstat (limited to 'c++/src/H5StrType.cpp')
-rw-r--r-- | c++/src/H5StrType.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/c++/src/H5StrType.cpp b/c++/src/H5StrType.cpp index 51840db..7499b8e 100644 --- a/c++/src/H5StrType.cpp +++ b/c++/src/H5StrType.cpp @@ -35,7 +35,7 @@ StrType::StrType( const hid_t existing_id ) : AtomType( existing_id ) {} // Copy constructor: makes copy of the original StrType object StrType::StrType( const StrType& original ) : AtomType ( original ) {} -// Gets the string datatype of the specified dataset - will reimplement +// Gets the string datatype of the specified dataset - will reimplement - BMR StrType::StrType( const DataSet& dataset ) : AtomType () { // Calls C function H5Dget_type to get the id of the datatype @@ -43,7 +43,7 @@ StrType::StrType( const DataSet& dataset ) : AtomType () if( id <= 0 ) { - throw DataSetIException(); + throw DataSetIException("StrType constructor", "H5Dget_type failed"); } } @@ -55,7 +55,7 @@ H5T_cset_t StrType::getCset() const // Returns a valid character set type if successful if( cset == H5T_CSET_ERROR ) { - throw DataTypeIException(); + throw DataTypeIException("StrType::getCset", "H5Tget_cset failed"); } return( cset ); } @@ -67,7 +67,7 @@ void StrType::setCset( H5T_cset_t cset ) const if( ret_value < 0 ) { - throw DataTypeIException(); + throw DataTypeIException("StrType::setCset", "H5Tset_cset failed"); } } @@ -79,7 +79,8 @@ H5T_str_t StrType::getStrpad() const // Returns a valid string padding type if successful if( strpad == H5T_STR_ERROR ) { - throw DataTypeIException(); + throw DataTypeIException("StrType::getStrpad", + "H5Tget_strpad failed - returned H5T_STR_ERROR"); } return( strpad ); } @@ -91,7 +92,7 @@ void StrType::setStrpad( H5T_str_t strpad ) const if( ret_value < 0 ) { - throw DataTypeIException(); + throw DataTypeIException("StrType::setStrpad", "H5Tset_strpad failed"); } } |