[0.16.51]Syntax errors not caught in settings stage
Posted: Mon Sep 10, 2018 2:30 pm
What did I do?Writing a mod, I forgot an 'end' which of course is a syntax error.
What happened?The error was caught by what I presume is the built-in Lua error handler. I got an error message dialogue that reads (using my simplified test case):
with an 'OK' button that would cause factorio to close.Failed to load mod "Syntax_error_test": __Syntax_error_test__/settings.lua:1: 'end' expected near <eof>
What did I expect?I expected the 'this mod had an oops' dialogue box that allows you to disable the mods that (probably) have a problem, all mods, restart or exit.
It appears that syntax errors aren't caught in the settings phase. I tested with a syntax error in data.lua, and that was caught successfully. Presumably the other phases will catch syntax errors more gracefully.
simplest possible code that failsa settings, settings-updates or settings-final-fixes that consists of the keyword 'do' (and no end).
Code: Select all