[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)
This commit is contained in:
Binh-Minh Ribler
2001-03-02 13:53:15 -05:00
parent cc647cfe5f
commit 42e15a3d6a
34 changed files with 66 additions and 81 deletions

View File

@@ -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" );
}
}