[0.16.51]Syntax errors not caught in settings stage

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
Fast Inserter
Fast Inserter
Posts: 164
Joined: Fri Feb 16, 2018 5:21 am

[0.16.51]Syntax errors not caught in settings stage

Post by mrudat »

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):
Failed to load mod "Syntax_error_test": __Syntax_error_test__/settings.lua:1: 'end' expected near <eof>
with an 'OK' button that would cause factorio to close.
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 fails
a settings, settings-updates or settings-final-fixes that consists of the keyword 'do' (and no end).

Code: Select all


Factorio Staff
Factorio Staff
Posts: 10500
Joined: Wed Jun 11, 2014 5:23 am

Re: [0.16.51]Syntax errors not caught in settings stage

Post by Rseding91 »

Thanks for the report. It's now fixed for 0.17.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”

Who is online

Users browsing this forum: No registered users