1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 15:52:54 +08:00

Catch and log exceptions from mod setting copy failure

This commit is contained in:
Salman Ahmed 2022-07-17 06:19:34 +03:00
parent 6636e462dc
commit 9382636da9

View File

@ -65,8 +65,15 @@ namespace osu.Game.Online.API
if (!Settings.TryGetValue(property.Name.Underscore(), out object settingValue))
continue;
try
{
resultMod.CopyAdjustedSetting((IBindable)property.GetValue(resultMod), settingValue);
}
catch (Exception ex)
{
Logger.Log($"Failed to copy mod setting value '{settingValue ?? "null"}' to \"{property.Name}\": {ex.Message}");
}
}
}
return resultMod;