MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / error

Class error

extlibs/sol3/include/sol/sol.hpp:3411–3434  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3409 } // namespace detail
3410
3411 class error : public std::runtime_error {
3412 private:
3413 // Because VC++ is upsetting, most of the time!
3414 std::string what_reason;
3415
3416 public:
3417 error(const std::string& str) : error(detail::direct_error, "lua: error: " + str) {
3418 }
3419 error(std::string&& str) : error(detail::direct_error, "lua: error: " + std::move(str)) {
3420 }
3421 error(detail::direct_error_tag, const std::string& str) : std::runtime_error(""), what_reason(str) {
3422 }
3423 error(detail::direct_error_tag, std::string&& str) : std::runtime_error(""), what_reason(std::move(str)) {
3424 }
3425
3426 error(const error& e) = default;
3427 error(error&& e) = default;
3428 error& operator=(const error& e) = default;
3429 error& operator=(error&& e) = default;
3430
3431 virtual const char* what() const noexcept override {
3432 return what_reason.c_str();
3433 }
3434 };
3435
3436} // namespace sol
3437

Callers 8

stack_failFunction · 0.70
getMethod · 0.70
pushMethod · 0.70
getMethod · 0.70
getMethod · 0.70
default_at_panicFunction · 0.70
script_throw_on_errorFunction · 0.70
invokeMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected