Logexceptions when loading ruleset DLLs

This commit is contained in:
Dean Herbert 2018-06-03 00:28:29 +09:00
parent 6781807e23
commit 88628812c6
1 changed files with 3 additions and 1 deletions

View File

@ -6,6 +6,7 @@
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using osu.Framework.Logging;
using osu.Game.Database; using osu.Game.Database;
namespace osu.Game.Rulesets namespace osu.Game.Rulesets
@ -114,8 +115,9 @@ private static void loadRulesetFromFile(string file)
var assembly = Assembly.LoadFrom(file); var assembly = Assembly.LoadFrom(file);
loaded_assemblies[assembly] = assembly.GetTypes().First(t => t.IsPublic && t.IsSubclassOf(typeof(Ruleset))); loaded_assemblies[assembly] = assembly.GetTypes().First(t => t.IsPublic && t.IsSubclassOf(typeof(Ruleset)));
} }
catch (Exception) catch (Exception e)
{ {
Logger.Error(e, "Failed to load ruleset");
} }
} }
} }