mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-29 06:51:30 -04:00
"Save game" errors are now correctly caught and displayed to the user
This commit is contained in:
parent
852c06ae07
commit
68498ec7ba
@ -45,8 +45,12 @@ object GameSaver {
|
|||||||
if (customSaveLocation != null && customSaveLocationHelper != null) {
|
if (customSaveLocation != null && customSaveLocationHelper != null) {
|
||||||
customSaveLocationHelper.saveGame(game, GameName, forcePrompt, saveCompletionCallback)
|
customSaveLocationHelper.saveGame(game, GameName, forcePrompt, saveCompletionCallback)
|
||||||
} else {
|
} else {
|
||||||
json().toJson(game, getSave(GameName, multiplayer))
|
try {
|
||||||
saveCompletionCallback?.invoke(null)
|
json().toJson(game, getSave(GameName, multiplayer))
|
||||||
|
saveCompletionCallback?.invoke(null)
|
||||||
|
} catch (ex: Exception) {
|
||||||
|
saveCompletionCallback?.invoke(ex)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user