summaryrefslogtreecommitdiffstats
path: root/c++/src/H5File.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2018-05-10 18:04:28 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2018-05-10 18:04:28 (GMT)
commitc32b7387083d574bfa5fc31fffc45cbf21b6a1f0 (patch)
tree665af0c032ce6dda6d110da87e4a66d05b016bb2 /c++/src/H5File.cpp
parentffd98d490f04952e01629c6378c4528459db9f9a (diff)
downloadhdf5-c32b7387083d574bfa5fc31fffc45cbf21b6a1f0.zip
hdf5-c32b7387083d574bfa5fc31fffc45cbf21b6a1f0.tar.gz
hdf5-c32b7387083d574bfa5fc31fffc45cbf21b6a1f0.tar.bz2
C++ API improvement
Description: - Reorganized some exception classes to reflect the HDF5 object hierarchy and provide extendibility. DataSetIException -> LocationException -> Exception DataTypeIException -> LocationException -> Exception GroupIException -> LocationException -> Exception AttributeIException -> LocationException -> Exception FileIException -> GroupIException -> LocationException -> Exception - Added throwException() to these subclasses and use it in H5Location and H5Object member functions to throw an exception that is specific to the object that invokes the member function. Applications that catch the base exception can continue to do the same. - Many cleanup for inconsistencies in comments/headers. Platforms tested: Linux/64 (jelly) Linux/64 (platypus) Darwin (osx1010test)
Diffstat (limited to 'c++/src/H5File.cpp')
-rw-r--r--c++/src/H5File.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp
index 782831b..7b19c7e 100644
--- a/c++/src/H5File.cpp
+++ b/c++/src/H5File.cpp
@@ -634,23 +634,15 @@ void H5File::close()
//--------------------------------------------------------------------------
// Function: H5File::throwException
-///\brief Throws file exception - initially implemented for CommonFG
+///\brief Throws H5::FileIException.
///\param func_name - Name of the function where failure occurs
///\param msg - Message describing the failure
///\exception H5::FileIException
-// Description
-// This function is used in CommonFG implementation so that
-// proper exception can be thrown for file or group. The
-// argument func_name is a member of CommonFG and "H5File::"
-// will be inserted to indicate the function called is an
-// implementation of H5File.
-// Programmer Binh-Minh Ribler - 2000
+// December 2000
//--------------------------------------------------------------------------
void H5File::throwException(const H5std_string& func_name, const H5std_string& msg) const
{
- H5std_string full_name = func_name;
- full_name.insert(0, "H5File::");
- throw FileIException(full_name, msg);
+ throw FileIException(inMemFunc(func_name.c_str()), msg);
}
//--------------------------------------------------------------------------