From e846222acec80f328bb85f84a1ffc5ae2fb4cdfc Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 19 Jun 2021 20:17:10 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E5=8C=96MES.traceback?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/file.lua | 2 +- Zframework/json.lua | 4 ++-- Zframework/message.lua | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Zframework/file.lua b/Zframework/file.lua index 99acdda9..b7b6630b 100644 --- a/Zframework/file.lua +++ b/Zframework/file.lua @@ -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 diff --git a/Zframework/json.lua b/Zframework/json.lua index ba13ad9f..d3783ce8 100644 --- a/Zframework/json.lua +++ b/Zframework/json.lua @@ -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 \ No newline at end of file diff --git a/Zframework/message.lua b/Zframework/message.lua index dee9113a..dff4e7b9 100644 --- a/Zframework/message.lua +++ b/Zframework/message.lua @@ -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","")