简化MES.traceback

This commit is contained in:
MrZ626
2021-06-19 20:17:10 +08:00
parent b3e9b128b6
commit e846222ace
3 changed files with 5 additions and 5 deletions

View File

@@ -50,7 +50,7 @@ function FILE.save(data,name,mode)
F:flush()F:close()
if not success then
MES.new('error',text.saveError..(mes or"unknown error"))
MES.traceback(1)
MES.traceback()
end
return success
end

View File

@@ -119,7 +119,7 @@ function json.encode(val)
if a then
return b
elseif MES then
MES.traceback(1)
MES.traceback()
end
end
@@ -349,7 +349,7 @@ function json.decode(str)
if a then
return b
elseif MES then
MES.traceback(1)
MES.traceback()
end
end
return json

View File

@@ -115,9 +115,9 @@ function MES.draw()
gc_pop()
end
function MES.traceback(n)
function MES.traceback()
local mes=
debug.traceback("",(n or 1)+1)
debug.traceback("",1)
:gsub(": in function",", in")
:gsub(":"," ")
:gsub("\t","")