[svn-r19923] BZ 1165: Implemented declaration change;

A static std::basic_string constructed in the Exception class.
  This static isn't one that can be be destructed by H5Library::close(),
but rather gets cleaned up as part of the STL std::basic_string static
destructor when the HDF5 DLL is detached (WINDOWS).
  Looking at the rest of the Exception code, the
DEFAULT_MSG doesn't really need to be a std::basic_string. 
Remove the static constructor and no destructor required.

Tested: local linux - will wait for Nightly Dailies before bringing to 1.8
This commit is contained in:
Allen Byrne 2011-01-06 16:34:16 -05:00
parent 8eb9d884e3
commit f53f6dffa6
2 changed files with 4 additions and 4 deletions

View File

@ -22,7 +22,7 @@
namespace H5 {
#endif
const H5std_string Exception::DEFAULT_MSG("No detailed information provided");
const char Exception::DEFAULT_MSG[] = "No detailed information provided";
//--------------------------------------------------------------------------
// Function: Exception default constructor
@ -252,7 +252,7 @@ void Exception::walkErrorStack( H5E_direction_t direction, H5E_walk2_t func, voi
// Function: Exception::getDetailMsg
///\brief Returns the detailed message set at the time the exception
/// is thrown.
///\return Text message - \c std::string
///\return Text message - \c H5std_string
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5std_string Exception::getDetailMsg() const
@ -275,7 +275,7 @@ const char* Exception::getCDetailMsg() const
//--------------------------------------------------------------------------
// Function: Exception::getFuncName
///\brief Returns the name of the function, where the exception is thrown.
///\return Text message - \c std::string
///\return Text message - \c H5std_string
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5std_string Exception::getFuncName() const

View File

@ -84,7 +84,7 @@ class H5_DLLCPP Exception {
protected:
// Default value for detail_message
static const H5std_string DEFAULT_MSG;
static const char DEFAULT_MSG[];
};
class H5_DLLCPP FileIException : public Exception {