summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Becker <fb@vxapps.com>2021-10-01 02:26:40 +0800
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2021-10-01 02:27:37 +0800
commited24ec011df58256ac275d434eba131027843184 (patch)
treef6421803d5e90b7df956f51045f29ef332db2565
parent4a09e067ec7ba06bc89cf30075f4befc892945d9 (diff)
downloadcppunit-ed24ec011df58256ac275d434eba131027843184.tar.gz
switch from throw() to noexcept
-rw-r--r--include/cppunit/plugin/DynamicLibraryManagerException.h6
-rw-r--r--src/cppunit/DynamicLibraryManagerException.cpp2
-rw-r--r--src/cppunit/Exception.cpp4
3 files changed, 4 insertions, 8 deletions
diff --git a/include/cppunit/plugin/DynamicLibraryManagerException.h b/include/cppunit/plugin/DynamicLibraryManagerException.h
index 74199ff..dc6402e 100644
--- a/include/cppunit/plugin/DynamicLibraryManagerException.h
+++ b/include/cppunit/plugin/DynamicLibraryManagerException.h
@@ -32,13 +32,9 @@ public:
const std::string &errorDetail,
Cause cause );
- ~DynamicLibraryManagerException() throw()
- {
- }
-
Cause getCause() const;
- const char *what() const throw() override;
+ const char *what() const noexcept override;
private:
std::string m_message;
diff --git a/src/cppunit/DynamicLibraryManagerException.cpp b/src/cppunit/DynamicLibraryManagerException.cpp
index d5a89d8..1d99fd1 100644
--- a/src/cppunit/DynamicLibraryManagerException.cpp
+++ b/src/cppunit/DynamicLibraryManagerException.cpp
@@ -28,7 +28,7 @@ DynamicLibraryManagerException::getCause() const
const char *
-DynamicLibraryManagerException::what() const throw()
+DynamicLibraryManagerException::what() const noexcept
{
return m_message.c_str();
}
diff --git a/src/cppunit/Exception.cpp b/src/cppunit/Exception.cpp
index 6685480..9401fbc 100644
--- a/src/cppunit/Exception.cpp
+++ b/src/cppunit/Exception.cpp
@@ -44,7 +44,7 @@ Exception::Exception( std::string message,
#endif
-Exception::~Exception() throw()
+Exception::~Exception() noexcept
{
}
@@ -68,7 +68,7 @@ Exception::operator =( const Exception& other )
const char*
-Exception::what() const throw()
+Exception::what() const noexcept
{
Exception *mutableThis = CPPUNIT_CONST_CAST( Exception *, this );
mutableThis->m_whatMessage = m_message.shortDescription() + "\n" +