debug(lua): __log сообщения внутри pcall fn
Чтобы увидеть РЕАЛЬНУЮ ошибку Lua-handler (раньше pcall глотал её).
This commit is contained in:
parent
6ce296570d
commit
eae2ad7cc5
@ -1748,11 +1748,15 @@ export function registerRobloxShim(lua, opts) {
|
||||
debug.sethook(function()
|
||||
coroutine.yield(0.016)
|
||||
end, "", 20000)
|
||||
pcall(fn, a1, a2, a3, a4)
|
||||
local ok, err = pcall(fn, a1, a2, a3, a4)
|
||||
if not ok then
|
||||
__log("error", "[handler-fn-error] " .. tostring(err))
|
||||
end
|
||||
end)
|
||||
__rbxl_register_coroutine(handlerId, co)
|
||||
local ok, ret = coroutine.resume(co)
|
||||
if not ok then
|
||||
__log("error", "[handler-resume-error] " .. tostring(ret))
|
||||
__rbxl_send_error(handlerId, tostring(ret))
|
||||
__rbxl_unregister_coroutine(handlerId)
|
||||
elseif type(ret) == 'number' then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user