fix
This commit is contained in:
@@ -9,14 +9,18 @@ local unpack = _G.unpack
|
||||
--make a namespace for schedules
|
||||
Details.Schedules = {}
|
||||
|
||||
local errorHandler = function(str)
|
||||
return str
|
||||
end
|
||||
|
||||
--run a scheduled function with its payload
|
||||
local triggerScheduledTick = function(tickerObject)
|
||||
local payload = tickerObject.payload
|
||||
local callback = tickerObject.callback
|
||||
|
||||
local result, errortext = pcall (callback, unpack(payload))
|
||||
local result, errortext = xpcall(callback, errorHandler, unpack(payload))
|
||||
if (not result) then
|
||||
Details:Msg("error on scheduler: ", tickerObject.path, tickerObject.name, errortext)
|
||||
Details:Msg("Error:", errortext, tickerObject.name or "")
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user