Skip to content
Snippets Groups Projects
Unverified Commit 3c8c8eb3 authored by Nils Braun's avatar Nils Braun Committed by GitHub
Browse files

Merge pull request #72 from GenFit/feature/c++17-preparations

Dynamic throw specifications are deprecated and removed in C++17 
parents 95b67463 c019b0fe
Branches
No related tags found
No related merge requests found
...@@ -55,7 +55,7 @@ class Exception : public std::exception { ...@@ -55,7 +55,7 @@ class Exception : public std::exception {
* @param file sourcefile in which the exception is created. Can be set through __FILE__ macro. * @param file sourcefile in which the exception is created. Can be set through __FILE__ macro.
*/ */
Exception(std::string excString, int line, std::string file); Exception(std::string excString, int line, std::string file);
virtual ~Exception() throw(); virtual ~Exception() noexcept;
//! Set fatal flag. //! Set fatal flag.
void setFatal (bool b=true){fatal_=b;} void setFatal (bool b=true){fatal_=b;}
...@@ -70,7 +70,7 @@ class Exception : public std::exception { ...@@ -70,7 +70,7 @@ class Exception : public std::exception {
void info(); void info();
//! Standard error message handling for exceptions. use like "std::cerr << e.what();" //! 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_;} std::string getExcString(){return excString_;}
......
...@@ -34,7 +34,7 @@ Exception::Exception(std::string excString, int line, std::string file) : ...@@ -34,7 +34,7 @@ Exception::Exception(std::string excString, int line, std::string file) :
errorMessage_ = ErrMsgStream.str(); errorMessage_ = ErrMsgStream.str();
} }
Exception::~Exception() throw() { Exception::~Exception() noexcept {
} }
void Exception::setNumbers(std::string _numbersLabel, void Exception::setNumbers(std::string _numbersLabel,
...@@ -49,7 +49,7 @@ void Exception::setMatrices(std::string _matricesLabel, ...@@ -49,7 +49,7 @@ void Exception::setMatrices(std::string _matricesLabel,
matrices_ = _matrices; matrices_ = _matrices;
} }
const char* Exception::what() const throw(){ const char* Exception::what() const noexcept{
return errorMessage_.c_str(); return errorMessage_.c_str();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment