add debug.get_traceback
This commit is contained in:
parent
dcd8871ee1
commit
712c0756b8
@ -228,6 +228,20 @@ function file.readlines(path)
|
||||
return lines
|
||||
end
|
||||
|
||||
function debug.get_trackback()
|
||||
local frames = {}
|
||||
local n = 0
|
||||
while true do
|
||||
local info = debug.getinfo(n)
|
||||
if info then
|
||||
table.insert(frames, info)
|
||||
else
|
||||
return frames
|
||||
end
|
||||
n = n + 1
|
||||
end
|
||||
end
|
||||
|
||||
package = {
|
||||
loaded={}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user