mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-24 03:53:12 -04:00
Resolved crash due to sending 'localized message' from exception
This commit is contained in:
parent
28a207813b
commit
467a0aa742
@ -965,11 +965,11 @@ object RulesetCache : HashMap<String,Ruleset>() {
|
||||
val newRuleset = getComplexRuleset(mods, baseRuleset)
|
||||
newRuleset.modOptions.isBaseRuleset = true // This is so the checkModLinks finds all connections
|
||||
newRuleset.checkModLinks(forOptionsPopup)
|
||||
} catch (ex: Exception) {
|
||||
} catch (ex: UncivShowableException) {
|
||||
// This happens if a building is dependent on a tech not in the base ruleset
|
||||
// because newRuleset.updateBuildingCosts() in getComplexRuleset() throws an error
|
||||
Ruleset.RulesetErrorList()
|
||||
.apply { add(ex.localizedMessage, Ruleset.RulesetErrorSeverity.Error) }
|
||||
.apply { add(ex.message!!.tr(), Ruleset.RulesetErrorSeverity.Error) }
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user