1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-22 00:53:50 +00:00
openmw-tes3mp/components/compiler/exception.hpp

33 lines
849 B
C++
Raw Normal View History

2010-06-27 17:20:21 +00:00
#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
{
virtual const char *what() const throw() { return "compile error";}
///< Return error message
};
/// \brief Exception: File error
2010-06-28 09:38:21 +00:00
class FileException : public SourceException
2010-06-27 17:20:21 +00:00
{
virtual const char *what() const throw() { return "can't read file"; }
///< Return error message
};
/// \brief Exception: EOF condition encountered
2010-06-28 09:38:21 +00:00
class EOFException : public SourceException
2010-06-27 17:20:21 +00:00
{ virtual const char *what() const throw() { return "end of file"; }
///< Return error message
};
}
#endif