crash the game instead of loading defaults if config file present but invalid; close #3068

This commit is contained in:
Adrian Siekierka 2022-09-06 19:29:36 +02:00
parent dee3bdeab4
commit e652fd8df1

View File

@ -518,7 +518,7 @@ object Settings {
catch { catch {
case e: Throwable => case e: Throwable =>
if (file.exists()) { if (file.exists()) {
OpenComputers.log.warn("Failed loading config, using defaults.", e) throw new RuntimeException("Error parsing configuration file. To restore defaults, delete '" + file.getName + "' and restart the game.", e)
} }
settings = new Settings(defaults.getConfig("opencomputers")) settings = new Settings(defaults.getConfig("opencomputers"))
defaults defaults