mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-10-01 00:50:15 -04:00
[Server] Include errors related to Lua calls in server logs
This commit is contained in:
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…
x
Reference in New Issue
Block a user