utf8解码报错后会提示windows用户换一个游戏版本

This commit is contained in:
MrZ626
2021-10-18 16:33:50 +08:00
parent 033a770759
commit 2ba25014c6
8 changed files with 12 additions and 4 deletions

View File

@@ -374,7 +374,11 @@ local function secondLoopThread()
repeat yield()until mainLoop()
end
function love.errorhandler(msg)
if not msg then msg="Unknown error" end
if type(msg)~='string'then
msg="Unknown error"
elseif msg:find("Invaild UTF-8")and text then
msg=text.tryAnotherBuild
end
--Generate error message
local err={"Error:"..msg}