Push error when an error happens
This commit is contained in:
parent
8c2bde7ed8
commit
bab9b13cb8
3
init.lua
3
init.lua
@ -1789,6 +1789,7 @@ co_status = {
|
|||||||
ref.OnDeath:Fire(ret,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14,r15,r16)
|
ref.OnDeath:Fire(ret,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14,r15,r16)
|
||||||
else
|
else
|
||||||
ref.OnError:Fire(ref,ret,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14,r15,r16)
|
ref.OnError:Fire(ref,ret,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14,r15,r16)
|
||||||
|
multi.error(ref, ret)
|
||||||
end
|
end
|
||||||
if i then
|
if i then
|
||||||
table.remove(th,i)
|
table.remove(th,i)
|
||||||
@ -2392,8 +2393,8 @@ function multi.error(self, err)
|
|||||||
end
|
end
|
||||||
if multi.defaultSettings.error then
|
if multi.defaultSettings.error then
|
||||||
error("^^^ " .. multi:getCurrentProcess():getFullName() .. " " .. multi:getCurrentTask().Type .. "\n" .. debug.traceback().."\n")
|
error("^^^ " .. multi:getCurrentProcess():getFullName() .. " " .. multi:getCurrentTask().Type .. "\n" .. debug.traceback().."\n")
|
||||||
end
|
|
||||||
os.exit(1)
|
os.exit(1)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function multi.success(...)
|
function multi.success(...)
|
||||||
|
|||||||
@ -59,8 +59,6 @@ tab = split(tab)
|
|||||||
|
|
||||||
local id = 0
|
local id = 0
|
||||||
|
|
||||||
print("Outerglobal",_G)
|
|
||||||
|
|
||||||
function multi:newSystemThread(name, func, ...)
|
function multi:newSystemThread(name, func, ...)
|
||||||
local env
|
local env
|
||||||
env = {
|
env = {
|
||||||
|
|||||||
@ -179,10 +179,8 @@ runTest = thread:newFunction(function()
|
|||||||
ec = ec + os.execute("lua tests/threadtests.lua p")
|
ec = ec + os.execute("lua tests/threadtests.lua p")
|
||||||
multi.print("Testing lanes threading")
|
multi.print("Testing lanes threading")
|
||||||
ec = ec + os.execute("lua tests/threadtests.lua l")
|
ec = ec + os.execute("lua tests/threadtests.lua l")
|
||||||
if ec > 0 then
|
if ec ~= 0 then
|
||||||
os.exit(1)
|
os.exit(1)
|
||||||
else
|
|
||||||
os.exit()
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|||||||
@ -251,7 +251,6 @@ multi:newThread("Scheduler Thread",function()
|
|||||||
|
|
||||||
we_good = true
|
we_good = true
|
||||||
multi:Stop() -- Needed in love2d tests to stop the main runner
|
multi:Stop() -- Needed in love2d tests to stop the main runner
|
||||||
os.exit()
|
|
||||||
end).OnError(multi.error)
|
end).OnError(multi.error)
|
||||||
|
|
||||||
multi.OnExit(function(err_or_errorcode)
|
multi.OnExit(function(err_or_errorcode)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user