1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 16:49:55 +00:00
openmw-tes3mp/components/compiler/exception.hpp

39 lines
881 B
C++

#ifndef COMPILER_EXCEPTION_H_INCLUDED
#define COMPILER_EXCEPTION_H_INCLUDED
#include <exception>
namespace Compiler
{
/// \brief Exception: Error while parsing the source
class SourceException : public std::exception
{
public:
const char *what() const noexcept override { return "Compile error";}
///< Return error message
};
/// \brief Exception: File error
class FileException : public SourceException
{
public:
const char *what() const noexcept override { return "Can't read file"; }
///< Return error message
};
/// \brief Exception: EOF condition encountered
class EOFException : public SourceException
{
public:
const char *what() const noexcept override { return "End of file"; }
///< Return error message
};
}
#endif