summaryrefslogtreecommitdiffstats
path: root/c++/src/H5Attribute.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c++/src/H5Attribute.cpp')
-rw-r--r--c++/src/H5Attribute.cpp33
1 files changed, 16 insertions, 17 deletions
diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp
index 3733736..207d73c 100644
--- a/c++/src/H5Attribute.cpp
+++ b/c++/src/H5Attribute.cpp
@@ -27,6 +27,8 @@
#include "H5FcreatProp.h"
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
+#include "H5StrcreatProp.h"
+#include "H5LcreatProp.h"
#include "H5LaccProp.h"
#include "H5Location.h"
#include "H5Object.h"
@@ -278,23 +280,6 @@ DataSpace Attribute::getSpace() const
}
//--------------------------------------------------------------------------
-// Function: Attribute::getFileName
-///\brief Gets the name of the file, in which this attribute belongs.
-///\return File name
-///\exception H5::IdComponentException
-// Programmer Binh-Minh Ribler - Jul, 2004
-//--------------------------------------------------------------------------
-H5std_string Attribute::getFileName() const
-{
- try {
- return(p_get_file_name());
- }
- catch (IdComponentException& E) {
- throw FileIException("Attribute::getFileName", E.getDetailMsg());
- }
-}
-
-//--------------------------------------------------------------------------
// Function: Attribute::getName
///\brief Gets the name of this attribute, returning its length.
///\param attr_name - OUT: Buffer for the name string as char*
@@ -633,6 +618,20 @@ void Attribute::p_setId(const hid_t new_id)
// reset object's id to the given id
id = new_id;
}
+
+//--------------------------------------------------------------------------
+// Function: Attribute::throwException
+///\brief Throws H5::AttributeIException.
+///\param func_name - Name of the function where failure occurs
+///\param msg - Message describing the failure
+///\exception H5::AttributeIException
+// May 2018
+//--------------------------------------------------------------------------
+void Attribute::throwException(const H5std_string& func_name, const H5std_string& msg) const
+{
+ throw AttributeIException(inMemFunc(func_name.c_str()), msg);
+}
+
#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------