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:
Nick Bolton 2014-03-14 20:33:18 +00:00
parent ab529fae41
commit d5b25069be
18 changed files with 68 additions and 41 deletions

View file

@ -23,15 +23,16 @@
//
const char*
XArch::what() const throw()
XArch::what() const _NOEXCEPT
{
const char* what = std::runtime_error::what();
try {
if (m_what.empty() && m_eval != NULL) {
m_what = m_eval->eval();
if (strlen(what) == 0 && m_eval != NULL) {
return m_eval->eval().c_str();
}
}
catch (...) {
// ignore
}
return m_what.c_str();
return what;
}