summaryrefslogtreecommitdiffstats
path: root/c++/src/H5File.cpp
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2013-04-19 17:24:43 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2013-04-19 17:24:43 (GMT)
commit0e1e79f0e02606364018806d465d48eed8ffd153 (patch)
treec7bffe852a3f284a397638536558b2a198a8bfdb /c++/src/H5File.cpp
parent14d8e1c2b5ecaf2e298984f269094dd5f2bd735f (diff)
downloadhdf5-0e1e79f0e02606364018806d465d48eed8ffd153.zip
hdf5-0e1e79f0e02606364018806d465d48eed8ffd153.tar.gz
hdf5-0e1e79f0e02606364018806d465d48eed8ffd153.tar.bz2
[svn-r23601] Bring revisions #23341 - 23597 from trunk to revise_chunks.
h5committtested.
Diffstat (limited to 'c++/src/H5File.cpp')
-rw-r--r--c++/src/H5File.cpp24
1 files changed, 19 insertions, 5 deletions
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp
index 92c4d32..ede7469 100644
--- a/c++/src/H5File.cpp
+++ b/c++/src/H5File.cpp
@@ -61,7 +61,7 @@ H5File::H5File() : H5Location(), id(0) {}
/// modifying default file meta-data. Default to
/// FileCreatPropList::DEFAULT
///\param access_plist - IN: File access property list. Default to
-/// FileCreatPropList::DEFAULT
+/// FileAccPropList::DEFAULT
///\par Description
/// Valid values of \a flags include:
/// \li \c H5F_ACC_TRUNC - Truncate file, if it already exists,
@@ -77,11 +77,18 @@ H5File::H5File() : H5Location(), id(0) {}
/// please refer to the \b Special \b case section in the C layer
/// Reference Manual at:
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5F.html#File-Create
+// Notes With a PGI compiler (~2012-2013), the exception thrown by p_get_file
+// could not be caught in the applications. Added try block here
+// to catch then re-throw it. -BMR 2013/03/21
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5File::H5File( const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : H5Location(0)
{
- p_get_file(name, flags, create_plist, access_plist);
+ try {
+ p_get_file(name, flags, create_plist, access_plist);
+ } catch (FileIException open_file) {
+ throw open_file;
+ }
}
//--------------------------------------------------------------------------
@@ -94,12 +101,19 @@ H5File::H5File( const char* name, unsigned int flags, const FileCreatPropList& c
/// modifying default file meta-data. Default to
/// FileCreatPropList::DEFAULT
///\param access_plist - IN: File access property list. Default to
-/// FileCreatPropList::DEFAULT
+/// FileAccPropList::DEFAULT
+// Notes With a PGI compiler (~2012-2013), the exception thrown by p_get_file
+// could not be caught in the applications. Added try block here
+// to catch then re-throw it. -BMR 2013/03/21
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5File::H5File( const H5std_string& name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : H5Location(0)
{
- p_get_file(name.c_str(), flags, create_plist, access_plist);
+ try {
+ p_get_file(name.c_str(), flags, create_plist, access_plist);
+ } catch (FileIException open_file) {
+ throw open_file;
+ }
}
//--------------------------------------------------------------------------
@@ -187,7 +201,7 @@ bool H5File::isHdf5(const H5std_string& name )
///\param name - IN: Name of the file
///\param flags - IN: File access flags
///\param access_plist - IN: File access property list. Default to
-/// FileCreatPropList::DEFAULT
+/// FileAccPropList::DEFAULT
///\par Description
/// Valid values of \a flags include:
/// H5F_ACC_RDWR: Open with read/write access. If the file is