From e652fd8df14c52dacac7384fb4c2633368f692ff Mon Sep 17 00:00:00 2001 From: Adrian Siekierka Date: Tue, 6 Sep 2022 19:29:36 +0200 Subject: [PATCH] crash the game instead of loading defaults if config file present but invalid; close #3068 --- src/main/scala/li/cil/oc/Settings.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/li/cil/oc/Settings.scala b/src/main/scala/li/cil/oc/Settings.scala index d4e8b0a68..168640a46 100644 --- a/src/main/scala/li/cil/oc/Settings.scala +++ b/src/main/scala/li/cil/oc/Settings.scala @@ -518,7 +518,7 @@ object Settings { catch { case e: Throwable => 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")) defaults