made spawn() log errors

This commit is contained in:
Izaya 2017-09-04 02:36:05 +10:00
parent f289516c9d
commit 9bc2b463ec

View File

@ -12,7 +12,10 @@ do -- so local works
_G.cT,sbt,C,T,io = 0,{},coroutine,table,io -- currentTask,sandboxTable _G.cT,sbt,C,T,io = 0,{},coroutine,table,io -- currentTask,sandboxTable
function _G.spawn(n,f,e) function _G.spawn(n,f,e)
tT[nP] = {} 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].n = n
tT[nP].p = cT or -1 tT[nP].p = cT or -1
if tT[cT] then if tT[cT] then