summaryrefslogtreecommitdiffstats
path: root/c++/src/H5File.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2001-03-02 18:53:15 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2001-03-02 18:53:15 (GMT)
commit42e15a3d6af05b67c07de7dcd579db39504fffa7 (patch)
treeff3bac3026121f15f26ba725c3c113c8f074b1f6 /c++/src/H5File.cpp
parentcc647cfe5f492d8810e5b1a6444a37c267c591c4 (diff)
downloadhdf5-42e15a3d6af05b67c07de7dcd579db39504fffa7.zip
hdf5-42e15a3d6af05b67c07de7dcd579db39504fffa7.tar.gz
hdf5-42e15a3d6af05b67c07de7dcd579db39504fffa7.tar.bz2
[svn-r3540] Purpose:
Feasibility improvement Description: - Some member functions in class Exception can be called without an Exception instance exits, but because they are not static, they cannot. - Many exception throwings don't provide any information to callers. Solution: - Add 'static' to several member functions in class Exception. - Added <class name::function name> to some exceptions thrown in H5File.cpp and H5FcreatProp.cpp. I'm trying this for users' comments. More information may be added later and to all exceptions. - Changed the comment line for emacs editor to: // C++ informative line for the emacs editor: -*- C++ -*- because... I'd rather not say that the code "may look like C" :-) Platforms tested: Linux (gcc version egcs-2.91.66)
Diffstat (limited to 'c++/src/H5File.cpp')
-rw-r--r--c++/src/H5File.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp
index 0498174..a9058bd 100644
--- a/c++/src/H5File.cpp
+++ b/c++/src/H5File.cpp
@@ -56,7 +56,7 @@ void H5File::getFile( const char* name, unsigned int flags, const FileCreatPropL
if( id <= 0 ) // throw an exception when open/create fail
{
- throw FileIException();
+ throw FileIException( "H5File constructor" );
}
}
@@ -79,7 +79,7 @@ bool H5File::isHdf5(const char* name )
return false;
else // Raise exception when H5Fis_hdf5 returns a negative value
{
- throw FileIException();
+ throw FileIException( "H5File::isHdf5" );
}
}
@@ -102,7 +102,7 @@ void H5File::reopen()
id = H5Freopen( id );
if( id <= 0 ) // Raise exception when H5Freopen returns a neg value
{
- throw FileIException();
+ throw FileIException( "H5File::reopen" );
}
}
@@ -120,7 +120,7 @@ FileCreatPropList H5File::getCreatePlist() const
}
else
{
- throw FileIException();
+ throw FileIException( "H5File::getCreatePlist" );
}
}
@@ -138,7 +138,7 @@ FileAccPropList H5File::getAccessPlist() const
}
else // Raise an exception
{
- throw FileIException();
+ throw FileIException( "H5File::getAccessPlist" );
}
}
@@ -148,7 +148,7 @@ void H5File::p_close() const
herr_t ret_value = H5Fclose( id );
if( ret_value < 0 )
{
- throw FileIException();
+ throw FileIException( "H5File::p_close" );
}
}