summaryrefslogtreecommitdiffstats
path: root/c++/src/H5CommonFG.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c++/src/H5CommonFG.cpp')
-rw-r--r--c++/src/H5CommonFG.cpp35
1 files changed, 17 insertions, 18 deletions
diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp
index 000729b..ae6a2bd 100644
--- a/c++/src/H5CommonFG.cpp
+++ b/c++/src/H5CommonFG.cpp
@@ -55,8 +55,7 @@ Group CommonFG::createGroup( const char* name, size_t size_hint ) const
}
else
{
- //throw File_GroupException();
- throwException();
+ throwException("createGroup", "H5Gcreate failed");
}
}
@@ -79,7 +78,7 @@ Group CommonFG::openGroup( const char* name ) const
}
else
{
- throwException();
+ throwException("openGroup", "H5Gopen failed");
}
}
@@ -106,7 +105,7 @@ DataSet CommonFG::createDataSet( const char* name, const DataType& data_type, co
}
else
{
- throwException();
+ throwException("createDataSet", "H5Dcreate failed");
}
}
@@ -129,7 +128,7 @@ DataSet CommonFG::openDataSet( const char* name ) const
}
else
{
- throwException();
+ throwException("openDataSet", "H5Dopen failed");
}
}
@@ -144,7 +143,7 @@ void CommonFG::link( H5G_link_t link_type, const char* curr_name, const char* ne
herr_t ret_value = H5Glink( getLocId(), link_type, curr_name, new_name );
if( ret_value < 0 )
{
- throwException();
+ throwException("link", "H5Glink failed");
}
}
@@ -158,7 +157,7 @@ void CommonFG::unlink( const char* name ) const
herr_t ret_value = H5Gunlink( getLocId(), name );
if( ret_value < 0 )
{
- throwException();
+ throwException("unlink", "H5Gunlink failed");
}
}
@@ -172,7 +171,7 @@ void CommonFG::move( const char* src, const char* dst ) const
herr_t ret_value = H5Gmove( getLocId(), src, dst );
if( ret_value < 0 )
{
- throwException();
+ throwException("move", "H5Gmove failed");
}
}
@@ -186,7 +185,7 @@ void CommonFG::getObjinfo( const char* name, hbool_t follow_link, H5G_stat_t& st
herr_t ret_value = H5Gget_objinfo( getLocId(), name, follow_link, &statbuf );
if( ret_value < 0 )
{
- throwException();
+ throwException("getObjinfo", "H5Gget_objinfo failed");
}
}
@@ -202,7 +201,7 @@ string CommonFG::getLinkval( const char* name, size_t size ) const
herr_t ret_value = H5Gget_linkval( getLocId(), name, size, value_C );
if( ret_value < 0 )
{
- throwException();
+ throwException("getLinkval", "H5Gget_linkval failed");
}
string value = string( value_C );
delete value_C;
@@ -219,7 +218,7 @@ void CommonFG::setComment( const char* name, const char* comment ) const
herr_t ret_value = H5Gset_comment( getLocId(), name, comment );
if( ret_value < 0 )
{
- throwException();
+ throwException("setComment", "H5Gset_comment failed");
}
}
@@ -238,7 +237,7 @@ string CommonFG::getComment( const char* name, size_t bufsize ) const
// if H5Gget_comment returns SUCCEED, return the string comment
if( ret_value < 0 )
{
- throwException();
+ throwException("getComment", "H5Gget_comment failed");
}
string comment = string( comment_C );
delete comment_C;
@@ -262,7 +261,7 @@ void CommonFG::mount( const char* name, H5File& child, PropList& plist ) const
// Raise exception if H5Fmount returns negative value
if( ret_value < 0 )
{
- throwException();
+ throwException("mount", "H5Fmount failed");
}
}
@@ -279,7 +278,7 @@ void CommonFG::unmount( const char* name ) const
// Raise exception if H5Funmount returns negative value
if( ret_value < 0 )
{
- throwException();
+ throwException("unmount", "H5Funmount failed");
}
}
@@ -289,7 +288,7 @@ void CommonFG::unmount( const char* name ) const
hid_t CommonFG::p_openDataType( const char* name ) const
{
// Call C function H5Topen to open the named datatype in this group,
- // giving the group id
+ // giving either the file or group id
hid_t datatype_id = H5Topen( getLocId(), name );
// If the datatype id is valid, return it, otherwise, throw an exception.
@@ -297,7 +296,7 @@ hid_t CommonFG::p_openDataType( const char* name ) const
return( datatype_id );
else
{
- throwException();
+ throwException("openDataType", "H5Topen failed");
}
}
@@ -382,9 +381,9 @@ int CommonFG::iterateElems( const char* name, int *idx, H5G_iterate_t op , void*
int ret_value = H5Giterate( getLocId(), name, idx, op, op_data );
if( ret_value >= 0 )
return( ret_value );
- else // raise exception when H5Aiterate returns a negative value
+ else // raise exception when H5Giterate returns a negative value
{
- throwException();
+ throwException("iterateElems", "H5Giterate failed");
}
}