File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
core/src/com/unciv/ui/screens/savescreens Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -229,14 +229,20 @@ abstract class LoadOrSaveScreen(
229229 return reposFromGithub.items.firstOrNull { it.name.lowercase() == repoName }
230230 ? : throw UncivShowableException (" Could not find a mod named \" [$repoName ]\" ." )
231231 }
232-
233- for (rawName in missingMods) {
234- val repoName = rawName.folderNameToRepoName().lowercase()
235- val repo = getRepo(repoName)
236- repo.downloadAndExtract()
232+
233+ val exceptions = mutableListOf<String >()
234+ for (rawModName in missingMods) {
235+ try {
236+ val repoName = rawModName.folderNameToRepoName().lowercase()
237+ val repo = getRepo(repoName)
238+ repo.downloadAndExtract()
237239 ? : throw Exception (" Unexpected 404 error" ) // downloadAndExtract returns null for 404 errors and the like -> display something!
238- onModDownloaded(repo.name)
240+ onModDownloaded(repo.name)
241+ } catch (e: Exception ) {
242+ if (e.message != null ) exceptions.add(e.message!! )
243+ }
239244 }
245+ if (exceptions.isNotEmpty()) throw UncivShowableException (exceptions.joinToString(" \n " ))
240246 onCompleted()
241247 }
242248 }
You can’t perform that action at this time.
0 commit comments