Assign the result variable to a parsed file in the try-catch statement of Configuration.kt
This commit is contained in:
parent
1c3981a81a
commit
5f96c53845
|
@ -24,10 +24,10 @@ object Configuration {
|
||||||
createNewFile()
|
createNewFile()
|
||||||
setWritable(true)
|
setWritable(true)
|
||||||
setReadable(true)
|
setReadable(true)
|
||||||
} else result = try {
|
} else try {
|
||||||
ConfigFactory.parseFile(file)
|
result = ConfigFactory.parseFile(file)
|
||||||
} catch (e: ConfigException) {
|
} catch (e: ConfigException) {
|
||||||
Snowy.logs.warn("Could not parse the snowy configuration file, the default configuration will be used instead."); result
|
Snowy.logs.warn("Could not parse the snowy configuration file, the default configuration will be used instead.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ConfigFactory.load(result).getConfig("Snowy").resolveWith(baseConf)
|
ConfigFactory.load(result).getConfig("Snowy").resolveWith(baseConf)
|
||||||
|
|
Loading…
Reference in New Issue