summaryrefslogtreecommitdiffstats
path: root/c++/src/H5IntType.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2001-03-10 03:59:46 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2001-03-10 03:59:46 (GMT)
commit9cd9f7f5216fbc30b10426f5bd11e26d81668eac (patch)
treebe3e4f25e5a870f8e98c7b1cfce3917a5dd19269 /c++/src/H5IntType.cpp
parentcd29e12e0252ccfc969281c5dabd991b46203f05 (diff)
downloadhdf5-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/H5IntType.cpp')
-rw-r--r--c++/src/H5IntType.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/c++/src/H5IntType.cpp b/c++/src/H5IntType.cpp
index bc1e1bc..c97daeb 100644
--- a/c++/src/H5IntType.cpp
+++ b/c++/src/H5IntType.cpp
@@ -35,7 +35,7 @@ IntType::IntType( const PredType& pred_type ) : AtomType()
// Creates a integer datatype using an existing id
IntType::IntType( const hid_t existing_id ) : AtomType( existing_id ) {}
-// Gets the integer datatype of the specified dataset - will reimplement
+// Gets the integer datatype of the specified dataset - will reimplement -BMR
IntType::IntType( const DataSet& dataset ) : AtomType()
{
// Calls C function H5Dget_type to get the id of the datatype
@@ -43,7 +43,7 @@ IntType::IntType( const DataSet& dataset ) : AtomType()
if( id <= 0 )
{
- throw DataSetIException();
+ throw DataSetIException("IntType constructor", "H5Dget_type failed");
}
}
@@ -54,7 +54,8 @@ H5T_sign_t IntType::getSign() const
// Returns a valid sign type if successful
if( type_sign == H5T_SGN_ERROR )
{
- throw DataTypeIException();
+ throw DataTypeIException("IntType::getSign",
+ "H5Tget_sign failed - returned H5T_SGN_ERROR for the sign type");
}
return( type_sign );
}
@@ -66,7 +67,7 @@ void IntType::setSign( H5T_sign_t sign ) const
herr_t ret_value = H5Tset_sign( id, sign );
if( ret_value < 0 )
{
- throw DataTypeIException();
+ throw DataTypeIException("IntType::setSign", "H5Tset_sign failed");
}
}