mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-31 17:10:47 +08:00
[svn-r24830] Purpose: HDFFV-8623
Description: Applied patch from user Jason Newton. JIRA issue HDFFV-8623, patch 9, improve c++ compatibility with exceptions. All additions of "throw()" are included. Exception::what() is not added because it is not necessary. It was suggested for the name, which follows stdlib. Platforms tested: Linux/ppc64 (ostrich) Linux/32 2.6 (jam) Linux/64 2.6 (koala)/PGI compilers
This commit is contained in:
parent
44fe3cc19b
commit
ff565cd175
@ -312,7 +312,7 @@ void Exception::printError( FILE* stream ) const
|
||||
///\brief Noop destructor
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Exception::~Exception() {}
|
||||
Exception::~Exception() throw() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Subclass: FileIException
|
||||
@ -335,7 +335,7 @@ FileIException::FileIException(const H5std_string& func_name, const H5std_string
|
||||
// Function: FileIException destructor
|
||||
///\brief Noop destructor.
|
||||
//--------------------------------------------------------------------------
|
||||
FileIException::~FileIException() {}
|
||||
FileIException::~FileIException() throw() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Subclass: GroupIException
|
||||
@ -358,7 +358,7 @@ GroupIException::GroupIException(const H5std_string& func_name, const H5std_stri
|
||||
// Function: GroupIException destructor
|
||||
///\brief Noop destructor.
|
||||
//--------------------------------------------------------------------------
|
||||
GroupIException::~GroupIException() {}
|
||||
GroupIException::~GroupIException() throw() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Subclass: DataSpaceIException
|
||||
@ -381,7 +381,7 @@ DataSpaceIException::DataSpaceIException(const H5std_string& func_name, const H5
|
||||
// Function: DataSpaceIException destructor
|
||||
///\brief Noop destructor.
|
||||
//--------------------------------------------------------------------------
|
||||
DataSpaceIException::~DataSpaceIException() {}
|
||||
DataSpaceIException::~DataSpaceIException() throw() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Subclass: DataTypeIException
|
||||
@ -404,7 +404,7 @@ DataTypeIException::DataTypeIException(const H5std_string& func_name, const H5st
|
||||
// Function: DataTypeIException destructor
|
||||
///\brief Noop destructor.
|
||||
//--------------------------------------------------------------------------
|
||||
DataTypeIException::~DataTypeIException() {}
|
||||
DataTypeIException::~DataTypeIException() throw() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Subclass: PropListIException
|
||||
@ -427,7 +427,7 @@ PropListIException::PropListIException(const H5std_string& func_name, const H5st
|
||||
// Function: PropListIException destructor
|
||||
///\brief Noop destructor.
|
||||
//--------------------------------------------------------------------------
|
||||
PropListIException::~PropListIException() {}
|
||||
PropListIException::~PropListIException() throw() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Subclass: DataSetIException
|
||||
@ -450,7 +450,7 @@ DataSetIException::DataSetIException(const H5std_string& func_name, const H5std_
|
||||
// Function: DataSetIException destructor
|
||||
///\brief Noop destructor.
|
||||
//--------------------------------------------------------------------------
|
||||
DataSetIException::~DataSetIException() {}
|
||||
DataSetIException::~DataSetIException() throw() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Subclass: AttributeIException
|
||||
@ -473,7 +473,7 @@ AttributeIException::AttributeIException(const H5std_string& func_name, const H5
|
||||
// Function: AttributeIException destructor
|
||||
///\brief Noop destructor.
|
||||
//--------------------------------------------------------------------------
|
||||
AttributeIException::~AttributeIException() {}
|
||||
AttributeIException::~AttributeIException() throw() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Subclass: ReferenceException
|
||||
@ -496,7 +496,7 @@ ReferenceException::ReferenceException(const H5std_string& func_name, const H5st
|
||||
// Function: ReferenceException destructor
|
||||
///\brief Noop destructor.
|
||||
//--------------------------------------------------------------------------
|
||||
ReferenceException::~ReferenceException() {}
|
||||
ReferenceException::~ReferenceException() throw() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Subclass: LibraryIException
|
||||
@ -519,7 +519,7 @@ LibraryIException::LibraryIException(const H5std_string& func_name, const H5std_
|
||||
// Function: LibraryIException destructor
|
||||
///\brief Noop destructor.
|
||||
//--------------------------------------------------------------------------
|
||||
LibraryIException::~LibraryIException() {}
|
||||
LibraryIException::~LibraryIException() throw() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Subclass: IdComponentException
|
||||
@ -542,7 +542,7 @@ IdComponentException::IdComponentException(const H5std_string& func_name, const
|
||||
// Function: IdComponentException destructor
|
||||
///\brief Noop destructor.
|
||||
//--------------------------------------------------------------------------
|
||||
IdComponentException::~IdComponentException() {}
|
||||
IdComponentException::~IdComponentException() throw() {}
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
} // end namespace
|
||||
#endif
|
||||
|
@ -81,7 +81,7 @@ class H5_DLLCPP Exception {
|
||||
Exception( const Exception& orig);
|
||||
|
||||
// virtual Destructor
|
||||
virtual ~Exception();
|
||||
virtual ~Exception() throw();
|
||||
|
||||
protected:
|
||||
// Default value for detail_message
|
||||
@ -96,70 +96,70 @@ class H5_DLLCPP FileIException : public Exception {
|
||||
public:
|
||||
FileIException( const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
|
||||
FileIException();
|
||||
virtual ~FileIException();
|
||||
virtual ~FileIException() throw();
|
||||
};
|
||||
|
||||
class H5_DLLCPP GroupIException : public Exception {
|
||||
public:
|
||||
GroupIException( const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
|
||||
GroupIException();
|
||||
virtual ~GroupIException();
|
||||
virtual ~GroupIException() throw();
|
||||
};
|
||||
|
||||
class H5_DLLCPP DataSpaceIException : public Exception {
|
||||
public:
|
||||
DataSpaceIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
|
||||
DataSpaceIException();
|
||||
virtual ~DataSpaceIException();
|
||||
virtual ~DataSpaceIException() throw();
|
||||
};
|
||||
|
||||
class H5_DLLCPP DataTypeIException : public Exception {
|
||||
public:
|
||||
DataTypeIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
|
||||
DataTypeIException();
|
||||
virtual ~DataTypeIException();
|
||||
virtual ~DataTypeIException() throw();
|
||||
};
|
||||
|
||||
class H5_DLLCPP PropListIException : public Exception {
|
||||
public:
|
||||
PropListIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
|
||||
PropListIException();
|
||||
virtual ~PropListIException();
|
||||
virtual ~PropListIException() throw();
|
||||
};
|
||||
|
||||
class H5_DLLCPP DataSetIException : public Exception {
|
||||
public:
|
||||
DataSetIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
|
||||
DataSetIException();
|
||||
virtual ~DataSetIException();
|
||||
virtual ~DataSetIException() throw();
|
||||
};
|
||||
|
||||
class H5_DLLCPP AttributeIException : public Exception {
|
||||
public:
|
||||
AttributeIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
|
||||
AttributeIException();
|
||||
virtual ~AttributeIException();
|
||||
virtual ~AttributeIException() throw();
|
||||
};
|
||||
|
||||
class H5_DLLCPP ReferenceException : public Exception {
|
||||
public:
|
||||
ReferenceException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
|
||||
ReferenceException();
|
||||
virtual ~ReferenceException();
|
||||
virtual ~ReferenceException() throw();
|
||||
};
|
||||
|
||||
class H5_DLLCPP LibraryIException : public Exception {
|
||||
public:
|
||||
LibraryIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
|
||||
LibraryIException();
|
||||
virtual ~LibraryIException();
|
||||
virtual ~LibraryIException() throw();
|
||||
};
|
||||
|
||||
class H5_DLLCPP IdComponentException : public Exception {
|
||||
public:
|
||||
IdComponentException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
|
||||
IdComponentException();
|
||||
virtual ~IdComponentException();
|
||||
virtual ~IdComponentException() throw();
|
||||
};
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
|
@ -220,7 +220,7 @@ InvalidActionException::InvalidActionException(const H5std_string func_name, con
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: InvalidActionException destructor
|
||||
//--------------------------------------------------------------------------
|
||||
InvalidActionException::~InvalidActionException() {}
|
||||
InvalidActionException::~InvalidActionException() throw() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: TestFailedException default constructor
|
||||
@ -242,5 +242,5 @@ TestFailedException::TestFailedException(const H5std_string func_name, const H5s
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: TestFailedException destructor
|
||||
//--------------------------------------------------------------------------
|
||||
TestFailedException::~TestFailedException() {}
|
||||
TestFailedException::~TestFailedException() throw() {}
|
||||
|
||||
|
@ -49,14 +49,14 @@ class InvalidActionException : public Exception {
|
||||
public:
|
||||
InvalidActionException(const H5std_string func_name, const H5std_string message = DEFAULT_MSG);
|
||||
InvalidActionException();
|
||||
virtual ~InvalidActionException();
|
||||
virtual ~InvalidActionException() throw();
|
||||
};
|
||||
|
||||
class TestFailedException : public Exception {
|
||||
public:
|
||||
TestFailedException(const H5std_string func_name, const H5std_string message = DEFAULT_MSG);
|
||||
TestFailedException();
|
||||
virtual ~TestFailedException();
|
||||
virtual ~TestFailedException() throw();
|
||||
};
|
||||
|
||||
// Overloaded/Template functions to verify values and display proper info
|
||||
|
Loading…
x
Reference in New Issue
Block a user