feat(rbxl): XML-������ ������ .rbxl + Day/Night + Tool/Mouse/Backpack flow #38

Closed
min wants to merge 39 commits from feat/rbxl-xml-parser-import into main
Showing only changes of commit ee0d91235c - Show all commits

View File

@ -183,7 +183,15 @@ export class LuaSharedSandbox {
Source = nil, Source = nil,
} }
local co = coroutine.create(function() local co = coroutine.create(function()
${entry.code} -- pcall защищает от runtime-ошибок которые иначе крашат
-- coroutine и могут повредить WASM-стейт. Возвраты
-- handler'а намеренно поглощаются.
local ok_, err_ = pcall(function()
${entry.code}
end)
if not ok_ then
__rbxl_send_error(${JSON.stringify(entry.id)}, tostring(err_))
end
end) end)
__rbxl_register_coroutine(${JSON.stringify(entry.id)}, co) __rbxl_register_coroutine(${JSON.stringify(entry.id)}, co)
local ok, ret = coroutine.resume(co) local ok, ret = coroutine.resume(co)