Pull up error handling from action to browser.

This commit is contained in:
2023-12-25 15:06:16 +08:00
parent 9bfa7f2048
commit 662cbf0827
2 changed files with 9 additions and 6 deletions

View File

@@ -178,7 +178,13 @@ namespace Cryville.Crtr.Browsing.UI {
return;
}
foreach (var i in _selectedItems) {
action.Invoke(_manager.GetItemUri(i), _manager[i]);
try {
action.Invoke(_manager.GetItemUri(i), _manager[i]);
}
catch (Exception ex) {
Dialog.Show(null, ex.Message);
Game.MainLogger.Log(4, "Config", "An error occurred while running the action: {0}", ex);
}
}
}
}