Slight tweaks for CreatureException, add tests to see if what() works.
This commit is contained in:
@@ -8,9 +8,10 @@ class CreatureException : std::exception {
|
||||
std::string _error;
|
||||
|
||||
public:
|
||||
CreatureException(std::string error) : _error(error) {}
|
||||
explicit CreatureException(std::string error) : _error(error) {}
|
||||
const char* what() const throw() override { return _error.c_str(); }
|
||||
|
||||
const char* what() const noexcept override { return _error.c_str(); }
|
||||
virtual ~CreatureException() = default;
|
||||
};
|
||||
|
||||
#endif // CREATURELIB_CREATUREEXCEPTION_HPP
|
||||
|
||||
Reference in New Issue
Block a user