报错时会把traceback信息保存到日志文件便于调试
This commit is contained in:
@@ -370,9 +370,21 @@ function love.errorhandler(msg)
|
|||||||
c=3
|
c=3
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
DBP(table.concat(errData.mes,"\n"),1,c-2)
|
errData.mes=table.concat(errData.mes,"\n",1,c-2)
|
||||||
|
DBP(errData.mes)
|
||||||
|
|
||||||
|
--Write messages to log file
|
||||||
|
love.filesystem.append("conf/error.log",
|
||||||
|
os.date("%Y/%m/%d_%A_%H:%M:%S\n")..
|
||||||
|
SYSTEM.."-"..VERSION_NAME.." scene: "..(SCN and SCN.cur or"NULL").."\n"..
|
||||||
|
errData.mes.."\n\n"
|
||||||
|
)
|
||||||
|
|
||||||
ins(ERRDATA,errData)
|
ins(ERRDATA,errData)
|
||||||
|
|
||||||
|
--Force quit if error too much
|
||||||
|
if #ERRDATA>=6 then return end
|
||||||
|
|
||||||
--Get screencapture
|
--Get screencapture
|
||||||
BG.set("none")
|
BG.set("none")
|
||||||
love.audio.stop()
|
love.audio.stop()
|
||||||
|
|||||||
Reference in New Issue
Block a user