summaryrefslogtreecommitdiffstats
path: root/c++/src/H5FloatType.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/H5FloatType.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/H5FloatType.cpp')
-rw-r--r--c++/src/H5FloatType.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/c++/src/H5FloatType.cpp b/c++/src/H5FloatType.cpp
index 34275f8..501d0e5 100644
--- a/c++/src/H5FloatType.cpp
+++ b/c++/src/H5FloatType.cpp
@@ -43,7 +43,7 @@ FloatType::FloatType( const DataSet& dataset ) : AtomType()
if( id <= 0 )
{
- throw DataSetIException();
+ throw DataSetIException("FloatType constructor", "H5Dget_type failed");
}
}
@@ -53,7 +53,7 @@ void FloatType::getFields( size_t& spos, size_t& epos, size_t& esize, size_t& mp
herr_t ret_value = H5Tget_fields( id, &spos, &epos, &esize, &mpos, &msize );
if( ret_value < 0 )
{
- throw DataTypeIException();
+ throw DataTypeIException("FloatType::getFields", "H5Tget_fields failed");
}
}
@@ -63,7 +63,7 @@ void FloatType::setFields( size_t spos, size_t epos, size_t esize, size_t mpos,
herr_t ret_value = H5Tset_fields( id, spos, epos, esize, mpos, msize );
if( ret_value < 0 )
{
- throw DataTypeIException();
+ throw DataTypeIException("FloatType::setFields", "H5Tset_fields failed");
}
}
@@ -74,7 +74,7 @@ size_t FloatType::getEbias() const
// Returns the bias if successful
if( ebias == 0 )
{
- throw DataTypeIException();
+ throw DataTypeIException("FloatType::getEbias", "H5Tget_ebias failed - returned exponent bias as 0");
}
return( ebias );
}
@@ -85,7 +85,7 @@ void FloatType::setEbias( size_t ebias ) const
herr_t ret_value = H5Tset_ebias( id, ebias );
if( ret_value < 0 )
{
- throw DataTypeIException();
+ throw DataTypeIException("FloatType::setEbias", "H5Tset_ebias failed");
}
}
@@ -96,7 +96,7 @@ H5T_norm_t FloatType::getNorm( string& norm_string ) const
// Returns a valid normalization type if successful
if( norm == H5T_NORM_ERROR )
{
- throw DataTypeIException();
+ throw DataTypeIException("FloatType::getNorm", "H5Tget_norm failed - returned H5T_NORM_ERROR");
}
if( norm == H5T_NORM_IMPLIED )
norm_string = "H5T_NORM_IMPLIED (0)";
@@ -113,7 +113,7 @@ void FloatType::setNorm( H5T_norm_t norm ) const
herr_t ret_value = H5Tset_norm( id, norm );
if( ret_value < 0 )
{
- throw DataTypeIException();
+ throw DataTypeIException("FloatType::setNorm", "H5Tset_norm failed");
}
}
@@ -124,7 +124,7 @@ H5T_pad_t FloatType::getInpad( string& pad_string ) const
// Returns a valid padding type if successful
if( pad_type == H5T_PAD_ERROR )
{
- throw DataTypeIException();
+ throw DataTypeIException("FloatType::getInpad", "H5Tget_inpad failed - returned H5T_PAD_ERROR");
}
if( pad_type == H5T_PAD_ZERO )
pad_string = "H5T_PAD_ZERO (0)";
@@ -141,7 +141,7 @@ void FloatType::setInpad( H5T_pad_t inpad ) const
herr_t ret_value = H5Tset_inpad( id, inpad );
if( ret_value < 0 )
{
- throw DataTypeIException();
+ throw DataTypeIException("FloatType::setInpad", "H5Tset_inpad failed");
}
}