Get rid of warning: dynamic exception specifications are deprecated

This commit is contained in:
fredzio 2020-10-10 12:08:27 +02:00
parent 0e8c5c5034
commit 460e69e92a
4 changed files with 14 additions and 14 deletions

View file

@ -10,8 +10,8 @@ namespace Compiler
class SourceException : public std::exception
{
public:
virtual const char *what() const throw() { return "Compile error";}
const char *what() const noexcept override { return "Compile error";}
///< Return error message
};
@ -20,18 +20,18 @@ namespace Compiler
class FileException : public SourceException
{
public:
virtual const char *what() const throw() { return "Can't read file"; }
const char *what() const noexcept final { return "Can't read file"; }
///< Return error message
};
/// \brief Exception: EOF condition encountered
class EOFException : public SourceException
{
{
public:
virtual const char *what() const throw() { return "End of file"; }
const char *what() const noexcept final { return "End of file"; }
///< Return error message
};
}