Page 1 of 1

[Rseding91] [1.1.110] on_init errors not reported with --create flag

Posted: Sun Sep 08, 2024 4:41 pm
by Gweneph
When a mod's on_init handler fails from creating a save file from the gui it gets reported and prevents the new save from being played.

When a save game is created via the --create command line flag, the error is reported via stdout. However, the save game file is still created and the error does not appear in the log:
logfile wrote: 1.741 Checksum for script __FactorioAccess__/control.lua: 1409838822
1.876 Goodbye
stdout wrote: 1.741 Checksum for script __FactorioAccess__/control.lua: 1409838822
Error: The mod Factorio Access Mod (0.12.3) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event FactorioAccess::on_init()
__FactorioAccess__/control.lua:6217: oh No!
stack traceback:
[C]: in function 'error'
__FactorioAccess__/control.lua:6217: in function <__FactorioAccess__/control.lua:6212>
1.876 Goodbye
I would expect that the save file generation would fail, and the error to appear in the log.

Re: [Rseding91] [1.1.110] on_init errors not reported with --create flag

Posted: Mon Oct 14, 2024 3:13 pm
by Rseding91
Thanks for the report, this appears to be fixed in 2.0 as part of the work done there.