diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-27 20:23:44 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-27 20:23:44 +1000 |
commit | 332983c97b7a729c4dc5f19aa9ee4a22c420f7d8 (patch) | |
tree | fd9c441b796b522bdd5c7f8fbd32f51b8eff2a28 /source/game/scripting/StarLuaComponents.cpp | |
parent | 14b9689b6d4f4ad5276c88130dc6e449bedc0709 (diff) |
The Formatting String Catastrophe
Diffstat (limited to 'source/game/scripting/StarLuaComponents.cpp')
-rw-r--r-- | source/game/scripting/StarLuaComponents.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/game/scripting/StarLuaComponents.cpp b/source/game/scripting/StarLuaComponents.cpp index 000e787..2d7c819 100644 --- a/source/game/scripting/StarLuaComponents.cpp +++ b/source/game/scripting/StarLuaComponents.cpp @@ -29,7 +29,7 @@ void LuaBaseComponent::setScripts(StringList scripts) { void LuaBaseComponent::addCallbacks(String groupName, LuaCallbacks callbacks) { if (!m_callbacks.insert(groupName, callbacks).second) - throw LuaComponentException::format("Duplicate callbacks named '%s' in LuaBaseComponent", groupName); + throw LuaComponentException::format("Duplicate callbacks named '{}' in LuaBaseComponent", groupName); if (m_context) m_context->setCallbacks(groupName, callbacks); @@ -75,7 +75,7 @@ bool LuaBaseComponent::init() { try { m_context = m_luaRoot->createContext(m_scripts); } catch (LuaException const& e) { - Logger::error("Exception while creating lua context for scripts '%s': %s", m_scripts, outputException(e, true)); + Logger::error("Exception while creating lua context for scripts '{}': {}", m_scripts, outputException(e, true)); m_error = String(printException(e, false)); m_context.reset(); return false; @@ -86,7 +86,7 @@ bool LuaBaseComponent::init() { try { m_context->invokePath("init"); } catch (LuaException const& e) { - Logger::error("Exception while calling script init: %s", outputException(e, true)); + Logger::error("Exception while calling script init: {}", outputException(e, true)); m_error = String(printException(e, false)); m_context.reset(); return false; @@ -102,7 +102,7 @@ void LuaBaseComponent::uninit() { try { m_context->invokePath("uninit"); } catch (LuaException const& e) { - Logger::error("Exception while calling script uninit: %s", outputException(e, true)); + Logger::error("Exception while calling script uninit: {}", outputException(e, true)); m_error = String(printException(e, false)); } } |