mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-28 05:39:10 +07:00
"Save game" errors are now correctly caught and displayed to the user
This commit is contained in:
@ -45,8 +45,12 @@ object GameSaver {
|
||||
if (customSaveLocation != null && customSaveLocationHelper != null) {
|
||||
customSaveLocationHelper.saveGame(game, GameName, forcePrompt, saveCompletionCallback)
|
||||
} else {
|
||||
json().toJson(game, getSave(GameName, multiplayer))
|
||||
saveCompletionCallback?.invoke(null)
|
||||
try {
|
||||
json().toJson(game, getSave(GameName, multiplayer))
|
||||
saveCompletionCallback?.invoke(null)
|
||||
} catch (ex: Exception) {
|
||||
saveCompletionCallback?.invoke(ex)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user