修复报错提示的场景显示不正确
This commit is contained in:
@@ -380,12 +380,13 @@ function love.errorhandler(msg)
|
|||||||
|
|
||||||
if LOADED and #ERRDATA<5 then
|
if LOADED and #ERRDATA<5 then
|
||||||
BG.set("none")
|
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
|
--Write messages to log file
|
||||||
love.filesystem.append("conf/error.log",
|
love.filesystem.append("conf/error.log",
|
||||||
os.date("%Y/%m/%d %A %H:%M:%S\n")..
|
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"
|
table.concat(err,"\n",1,c-2).."\n\n"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ local scene={}
|
|||||||
|
|
||||||
function scene.sceneInit()
|
function scene.sceneInit()
|
||||||
BGcolor=rnd()>.026 and{.3,.5,.9}or{.62,.3,.926}
|
BGcolor=rnd()>.026 and{.3,.5,.9}or{.62,.3,.926}
|
||||||
stateInfo=SYSTEM.."-"..VERSION_NAME.." scene:"..SCN.cur
|
stateInfo=SYSTEM.."-"..VERSION_NAME.." scene:"..ERRDATA[#ERRDATA].scene
|
||||||
errorText=LOADED and text.errorMsg or"An error has occurred during loading.\nError info has been created, and you can send it to the author."
|
errorText=LOADED and text.errorMsg or"An error has occurred during loading.\nError info has been created, and you can send it to the author."
|
||||||
errorShot,errorInfo=ERRDATA[#ERRDATA].shot,ERRDATA[#ERRDATA].mes
|
errorShot,errorInfo=ERRDATA[#ERRDATA].shot,ERRDATA[#ERRDATA].mes
|
||||||
if SETTING then SFX.fplay("error",SETTING.voc*.8 or 0)end
|
if SETTING then SFX.fplay("error",SETTING.voc*.8 or 0)end
|
||||||
|
|||||||
Reference in New Issue
Block a user