made spawn() log errors

This commit is contained in:
Izaya 2017-09-04 02:36:05 +10:00
parent f289516c9d
commit 9bc2b463ec
1 changed files with 4 additions and 1 deletions

View File

@ -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