[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)...);
#if defined (ENABLE_LUA)
else if (script->script_type == SCRIPT_LUA)
script->lang->Call(data.name, data.callback.types, B, std::forward<Args>(args)...);
{
try
{
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
++count;
}

Loading…
Cancel
Save