diff --git a/core/include/Exception.h b/core/include/Exception.h index 212e0244751cc65304039927553ea2356a4be617..25405802bf7427d939f4e066b22d4aa9a86a2132 100644 --- a/core/include/Exception.h +++ b/core/include/Exception.h @@ -55,7 +55,7 @@ class Exception : public std::exception { * @param file sourcefile in which the exception is created. Can be set through __FILE__ macro. */ Exception(std::string excString, int line, std::string file); - virtual ~Exception() throw(); + virtual ~Exception() noexcept; //! Set fatal flag. void setFatal (bool b=true){fatal_=b;} @@ -70,7 +70,7 @@ class Exception : public std::exception { void info(); //! Standard error message handling for exceptions. use like "std::cerr << e.what();" - virtual const char* what() const throw(); + virtual const char* what() const noexcept; std::string getExcString(){return excString_;} diff --git a/core/src/Exception.cc b/core/src/Exception.cc index c5439d22b48a48bb824f8ad5af663f5fdc5926ce..4b292080cc29c84430a87c87ef3de84d4b52a256 100644 --- a/core/src/Exception.cc +++ b/core/src/Exception.cc @@ -34,7 +34,7 @@ Exception::Exception(std::string excString, int line, std::string file) : errorMessage_ = ErrMsgStream.str(); } -Exception::~Exception() throw() { +Exception::~Exception() noexcept { } void Exception::setNumbers(std::string _numbersLabel, @@ -49,7 +49,7 @@ void Exception::setMatrices(std::string _matricesLabel, matrices_ = _matrices; } -const char* Exception::what() const throw(){ +const char* Exception::what() const noexcept{ return errorMessage_.c_str(); }