mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-13 07:06:10 +08:00
fixed: extending std::runtime_error instead, as std::exception ctor is undefined. also fixed some mac warnings from inheriting runtime_error.
This commit is contained in:
@@ -27,29 +27,30 @@
|
||||
//
|
||||
|
||||
XBase::XBase() :
|
||||
m_what()
|
||||
std::runtime_error("")
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
XBase::XBase(const CString& msg) :
|
||||
m_what(msg)
|
||||
std::runtime_error(msg)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
XBase::~XBase()
|
||||
XBase::~XBase() _NOEXCEPT
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
const char*
|
||||
XBase::what() const
|
||||
XBase::what() const _NOEXCEPT
|
||||
{
|
||||
if (m_what.empty()) {
|
||||
m_what = getWhat();
|
||||
const char* what = std::runtime_error::what();
|
||||
if (strlen(what) == 0) {
|
||||
return getWhat().c_str();
|
||||
}
|
||||
return m_what.c_str();
|
||||
return what;
|
||||
}
|
||||
|
||||
CString
|
||||
|
||||
Reference in New Issue
Block a user