Working on 16.0.0 #53

Merged
rayaman merged 120 commits from v16.0.0 into master 2024-02-25 00:00:51 -05:00
4 changed files with 11 additions and 8 deletions
Showing only changes of commit 81fc7b95c9 - Show all commits

1
error.lua Normal file
View File

@ -0,0 +1 @@
os.exit(2)

View File

@ -2431,6 +2431,7 @@ multi.SetName = multi.setName
local _os = os.exit
function os.exit(n)
print("ERROR_"..n)
multi.OnExit:Fire(n or 0)
_os(n)
end

View File

@ -1,6 +1,6 @@
local multi, thread = require("multi"):init{error=true}
multi.error("Currntly not supported!")
os.exit()
os.exit(1)
local effil = require("effil")
-- I like some of the things that this library offers.

View File

@ -52,7 +52,7 @@ multi:newThread("Scheduler Thread",function()
queue:push("done")
end,"Passing some args", 1, 2, 3, true, {"Table"}).OnError(function(self,err)
multi.error(err)
os.exit()
os.exit(1)
end)
if thread.hold(function()
@ -101,7 +101,7 @@ multi:newThread("Scheduler Thread",function()
if val == multi.TIMEOUT then
multi.error("SystemThreadedTables: Failed")
os.exit()
os.exit(1)
end
multi.success("SystemThreadedTables: Ok")
@ -126,7 +126,7 @@ multi:newThread("Scheduler Thread",function()
if val == multi.TIMEOUT then
multi.error("SystemThreadedJobQueues: Failed")
os.exit()
os.exit(1)
end
multi.success("SystemThreadedJobQueues: Ok")
@ -173,13 +173,14 @@ multi:newThread("Scheduler Thread",function()
multi.success("SystemThreadedConnections: Ok")
we_good = true
os.exit()
os.exit(1)
end).OnError(multi.error)
multi.OnExit(function(err)
multi.OnExit(function(err_or_errorcode)
print("Final status!",err_or_errorcode)
if not we_good then
multi.error("There was an error running some tests!")
os.exit(1)
multi.info("There was an error running some tests!")
return
else
multi.success("Tests complete!")
end