Show the error screen instead of just exiting after printing the error, if there's a syntax error in conf.lua (thanks Shoozza!)

This commit is contained in:
Alex Szpakowski
2015-12-12 14:13:04 -04:00
parent de0b63a48d
commit 44d4ce2c99
2 changed files with 13 additions and 11 deletions
+3 -3
View File
@@ -386,13 +386,13 @@ function love.init()
end
-- If config file exists, load it and allow it to update config table.
if not love.conf and love.filesystem and love.filesystem.isFile("conf.lua") then
require("conf")
local confok, conferr
if (not love.conf) and love.filesystem and love.filesystem.isFile("conf.lua") then
confok, conferr = pcall(require, "conf")
end
-- Yes, conf.lua might not exist, but there are other ways of making
-- love.conf appear, so we should check for it anyway.
local confok, conferr
if love.conf then
confok, conferr = pcall(love.conf, c)
-- If love.conf errors, we'll trigger the error after loading modules so