mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-17 03:05:30 -04:00
moved config loading into the try-catch in which it was supposed to be in all along...
This commit is contained in:
parent
b2b56419c9
commit
e05a26c73d
@ -150,13 +150,13 @@ object Settings {
|
||||
out.close()
|
||||
}
|
||||
val defaults = ConfigFactory.defaultReference().withOnlyPath("opencomputers")
|
||||
val config = ConfigFactory.parseFile(file).withFallback(defaults)
|
||||
try {
|
||||
val config = ConfigFactory.parseFile(file).withFallback(defaults)
|
||||
settings = new Settings(config.getConfig("opencomputers"))
|
||||
}
|
||||
catch {
|
||||
case e: Throwable =>
|
||||
OpenComputers.log.log(Level.WARNING, "Failed loading config, using defaults.", e)
|
||||
OpenComputers.log.warning("Failed loading config, using defaults. The reason was: " + e.getMessage)
|
||||
settings = new Settings(defaults.getConfig("opencomputers"))
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user