diff --git a/sol/error.hpp b/sol/error.hpp index 5e4f41ca6..5c170e72a 100644 --- a/sol/error.hpp +++ b/sol/error.hpp @@ -44,7 +44,7 @@ class error : public std::runtime_error { error& operator=(const error& e) = default; error& operator=(error&& e) = default; - virtual const char* what() const override { + virtual const char* what() const noexcept override { return w.c_str(); } };