Initial work on standard library
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2019-06-29 16:18:59 +02:00
parent ecfc1ae3b7
commit 24c560b52d
12 changed files with 213 additions and 22 deletions

View File

@@ -11,14 +11,14 @@ namespace Porygon::Evaluation {
class EvaluationException : public std::exception {
string _message;
public:
explicit EvaluationException(string message) {
_message = std::move(message);
explicit EvaluationException(const string& message) {
_message = defaultErrorText +message;
}
const string defaultErrorText = "An evaluation exception occurred: ";
const char *what() const noexcept final {
return (defaultErrorText + _message).c_str();
return _message.c_str();
}
};
}