blob: 66c190f5ecd47a00de0a9031fb31e45772c467ca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
require "llthreads".new([[
require "string"
require "llthreads".set_logger(function(msg)
if type(msg) ~= 'string' then
print("ERROR! Invalid error message: ", msg)
os.exit(-2)
end
if not msg:find("SOME ERROR", nil, true) then
print("ERROR! Invalid error message: ", msg)
os.exit(-1)
end
print("Done!")
os.exit(0)
end)
error("SOME ERROR")
]]):start():join()
print("ERROR! Logger has not been call!")
os.exit(-1)
|