diff --git a/Core/LuaContext.cpp b/Core/LuaContext.cpp index a7803d52b3..7738d328b8 100644 --- a/Core/LuaContext.cpp +++ b/Core/LuaContext.cpp @@ -134,7 +134,7 @@ void LuaContext::ExecuteConsoleCommand(std::string_view cmd) { sol::error err = result; lines_.push_back(LuaLogLine{ LogLineType::Error, std::string(err.what()) }); } - } catch (sol::error e) { + } catch (const sol::error& e) { ERROR_LOG(Log::System, "Lua exception: %s", e.what()); lines_.push_back(LuaLogLine{ LogLineType::Error, std::string(e.what()) }); }