diff --git a/modules/base/header.lua b/modules/base/header.lua index b15e3b1..45688c8 100644 --- a/modules/base/header.lua +++ b/modules/base/header.lua @@ -12,7 +12,10 @@ do -- so local works _G.cT,sbt,C,T,io = 0,{},coroutine,table,io -- currentTask,sandboxTable function _G.spawn(n,f,e) tT[nP] = {} - tT[nP].c = coroutine.create(f) + local function nf() + log(xpcall(f)) + end + tT[nP].c = coroutine.create(nf) tT[nP].n = n tT[nP].p = cT or -1 if tT[cT] then