Work on evaluation

This commit is contained in:
2019-05-23 18:50:09 +02:00
parent 57cd3efec9
commit d949d9aa8f
10 changed files with 283 additions and 4 deletions

View File

@@ -0,0 +1,22 @@
#ifndef PORYGONLANG_EVALUATIONEXCEPTION_HPP
#define PORYGONLANG_EVALUATIONEXCEPTION_HPP
#include <exception>
#include <string>
using namespace std;
class EvaluationException : std::exception {
string _message;
public:
explicit EvaluationException(string message){
_message = message;
}
const string defaultErrorText = "An evaluation exception occurred: ";
const char* what() const noexcept final{
return (defaultErrorText + _message).c_str();
}
};
#endif //PORYGONLANG_EVALUATIONEXCEPTION_HPP