Initial work on standard library
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user