[Server] Include errors related to Lua calls in server logs

pull/490/head
David Cernat 6 years ago
parent ef80894c5c
commit 2933526995

@ -90,7 +90,17 @@ public:
(callback)(std::forward<Args>(args)...); (callback)(std::forward<Args>(args)...);
#if defined (ENABLE_LUA) #if defined (ENABLE_LUA)
else if (script->script_type == SCRIPT_LUA) else if (script->script_type == SCRIPT_LUA)
{
try
{
script->lang->Call(data.name, data.callback.types, B, std::forward<Args>(args)...); script->lang->Call(data.name, data.callback.types, B, std::forward<Args>(args)...);
}
catch (std::exception &e)
{
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, e.what());
throw;
}
}
#endif #endif
++count; ++count;
} }

Loading…
Cancel
Save