修复报错提示的场景显示不正确

This commit is contained in:
MrZ626
2021-03-24 00:54:34 +08:00
parent 08d69bf1e7
commit 9f8b8d2596
2 changed files with 4 additions and 3 deletions

View File

@@ -380,12 +380,13 @@ function love.errorhandler(msg)
if LOADED and #ERRDATA<5 then
BG.set("none")
ERRDATA[#ERRDATA+1]={mes=err}
local scn=SCN and SCN.cur or"NULL"
ERRDATA[#ERRDATA+1]={mes=err,scene=scn}
--Write messages to log file
love.filesystem.append("conf/error.log",
os.date("%Y/%m/%d %A %H:%M:%S\n")..
#ERRDATA.." crash(es) "..SYSTEM.."-"..VERSION_NAME.." scene: "..(SCN and SCN.cur or"NULL").."\n"..
#ERRDATA.." crash(es) "..SYSTEM.."-"..VERSION_NAME.." scene: "..scn.."\n"..
table.concat(err,"\n",1,c-2).."\n\n"
)