fixed: exception getWhat usage returns garbage.

This commit is contained in:
Nick Bolton 2014-03-31 13:56:41 +00:00
parent 93b8248281
commit 26d0f59e65
2 changed files with 4 additions and 1 deletions

View File

@ -48,7 +48,8 @@ XBase::what() const _NOEXCEPT
{
const char* what = std::runtime_error::what();
if (strlen(what) == 0) {
return getWhat().c_str();
m_what = getWhat();
return m_what.c_str();
}
return what;
}

View File

@ -48,6 +48,8 @@ protected:
*/
virtual CString format(const char* id,
const char* defaultFormat, ...) const throw();
private:
mutable CString m_what;
};
/*!