#ifndef PORYGONLANG_EXCEPTION_HPP #define PORYGONLANG_EXCEPTION_HPP #include #include class Exception : public std::exception{ const std::string _err; public: explicit Exception(const char* err) :_err(std::string(err)){ } [[nodiscard]] const char *what() const noexcept final { return _err.c_str(); } }; #endif //PORYGONLANG_EXCEPTION_HPP