modernize C++: use noexcept
This commit is contained in:
@@ -81,7 +81,7 @@ Exception &Exception::operator=(const Exception &inst)
|
||||
return *this;
|
||||
}
|
||||
|
||||
const char* Exception::what() const throw()
|
||||
const char* Exception::what() const noexcept
|
||||
{
|
||||
return _sErrMsg.c_str();
|
||||
}
|
||||
@@ -174,7 +174,7 @@ AbortException::AbortException()
|
||||
_sErrMsg = "Aborted operation";
|
||||
}
|
||||
|
||||
const char* AbortException::what() const throw()
|
||||
const char* AbortException::what() const noexcept
|
||||
{
|
||||
return Exception::what();
|
||||
}
|
||||
@@ -224,7 +224,7 @@ XMLParseException::XMLParseException()
|
||||
_sErrMsg = "XML parse exception";
|
||||
}
|
||||
|
||||
const char* XMLParseException::what() const throw()
|
||||
const char* XMLParseException::what() const noexcept
|
||||
{
|
||||
return XMLBaseException::what();
|
||||
}
|
||||
@@ -251,7 +251,7 @@ XMLAttributeError::XMLAttributeError()
|
||||
_sErrMsg = "XML attribute error";
|
||||
}
|
||||
|
||||
const char* XMLAttributeError::what() const throw()
|
||||
const char* XMLAttributeError::what() const noexcept
|
||||
{
|
||||
return XMLBaseException::what();
|
||||
}
|
||||
@@ -312,7 +312,7 @@ FileException & FileException::operator=(const FileException &inst)
|
||||
return *this;
|
||||
}
|
||||
|
||||
const char* FileException::what() const throw()
|
||||
const char* FileException::what() const noexcept
|
||||
{
|
||||
return _sErrMsgAndFileName.c_str();
|
||||
}
|
||||
@@ -428,7 +428,7 @@ MemoryException & MemoryException::operator=(const MemoryException &inst)
|
||||
}
|
||||
|
||||
#if defined (__GNUC__)
|
||||
const char* MemoryException::what() const throw()
|
||||
const char* MemoryException::what() const noexcept
|
||||
{
|
||||
// call what() of Exception, not of std::bad_alloc
|
||||
return Exception::what();
|
||||
|
||||
Reference in New Issue
Block a user