File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
common/src/main/kotlin/com/lambda/config Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -92,18 +92,18 @@ abstract class Configuration : Jsonable {
9292 this @Configuration.info(message)
9393 }
9494 .onFailure {
95- val message = " Failed to load ${configName.capitalize()} config, loading backup"
95+ var message = " Failed to load ${configName.capitalize()} config, loading backup"
9696 LOG .error(message, it)
9797 this @Configuration.logError(message)
9898 runCatching { load(backup) }
9999 .onSuccess {
100- val message = " ${configName.capitalize()} config loaded from backup"
100+ message = " ${configName.capitalize()} config loaded from backup"
101101 LOG .info(message)
102102 this @Configuration.info(message)
103103 }
104- .onFailure {
105- val message = " Failed to load ${configName.capitalize()} config from backup, unrecoverable error"
106- LOG .error(message, it )
104+ .onFailure { error ->
105+ message = " Failed to load ${configName.capitalize()} config from backup, unrecoverable error"
106+ LOG .error(message, error )
107107 this @Configuration.logError(message)
108108 }
109109 }
You can’t perform that action at this time.
0 commit comments