diff --git a/.gitignore b/.gitignore index b345e9d61..b02e6010d 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,5 @@ openmw.cfg Doxygen .thumbnails resources +mwcompiler +mwinterpreter diff --git a/components/compiler/exception.hpp b/components/compiler/exception.hpp index 3f0ff4c55..979315801 100644 --- a/components/compiler/exception.hpp +++ b/components/compiler/exception.hpp @@ -1,32 +1,32 @@ -#ifndef COMPILER_EXCEPTION_H_INCLUDED -#define COMPILER_EXCEPTION_H_INCLUDED - -#include - -namespace Compiler -{ - /// \brief Exception: Error while parsing the source - +#ifndef COMPILER_EXCEPTION_H_INCLUDED +#define COMPILER_EXCEPTION_H_INCLUDED + +#include + +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 + { + virtual const char *what() const throw() { return "compile error";} + ///< Return error message }; - - /// \brief Exception: File error - + + /// \brief Exception: File error + class FileException : public SourceException { - virtual const char *what() const throw() { return "can't read file"; } - ///< Return error message + virtual const char *what() const throw() { return "can't read file"; } + ///< Return error message }; - - /// \brief Exception: EOF condition encountered - + + /// \brief Exception: EOF condition encountered + class EOFException : public SourceException - { virtual const char *what() const throw() { return "end of file"; } - ///< Return error message + { virtual const char *what() const throw() { return "end of file"; } + ///< Return error message }; -} - -#endif +} + +#endif diff --git a/components/compiler/streamerrorhandler.cpp b/components/compiler/streamerrorhandler.cpp index a0777be68..a1d12b708 100644 --- a/components/compiler/streamerrorhandler.cpp +++ b/components/compiler/streamerrorhandler.cpp @@ -35,4 +35,4 @@ namespace Compiler << " " << message << std::endl; } - StreamErrorHandler::StreamErrorHandler (std::ostream& ErrorStream) : mStream (ErrorStream) {} } + StreamErrorHandler::StreamErrorHandler (std::ostream& ErrorStream) : mStream (ErrorStream) {}}