1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 17:52:56 +08:00

Also catch exceptions in the construction call

This commit is contained in:
Dean Herbert 2020-09-04 16:28:19 +09:00
parent a15653c77c
commit 644f3375ac

View File

@ -36,18 +36,16 @@ namespace osu.Game.Overlays.Settings.Sections
{
foreach (Ruleset ruleset in rulesets.AvailableRulesets.Select(info => info.CreateInstance()))
{
SettingsSubsection section = ruleset.CreateSettings();
if (section != null)
try
{
try
{
SettingsSubsection section = ruleset.CreateSettings();
if (section != null)
Add(section);
}
catch (Exception e)
{
Logger.Error(e, $"Failed to load ruleset settings");
}
}
catch (Exception e)
{
Logger.Error(e, $"Failed to load ruleset settings");
}
}
}