fixed: exception getWhat usage returns garbage.
This commit is contained in:
parent
93b8248281
commit
26d0f59e65
|
@ -48,7 +48,8 @@ XBase::what() const _NOEXCEPT
|
||||||
{
|
{
|
||||||
const char* what = std::runtime_error::what();
|
const char* what = std::runtime_error::what();
|
||||||
if (strlen(what) == 0) {
|
if (strlen(what) == 0) {
|
||||||
return getWhat().c_str();
|
m_what = getWhat();
|
||||||
|
return m_what.c_str();
|
||||||
}
|
}
|
||||||
return what;
|
return what;
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,6 +48,8 @@ protected:
|
||||||
*/
|
*/
|
||||||
virtual CString format(const char* id,
|
virtual CString format(const char* id,
|
||||||
const char* defaultFormat, ...) const throw();
|
const char* defaultFormat, ...) const throw();
|
||||||
|
private:
|
||||||
|
mutable CString m_what;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
Loading…
Reference in New Issue