Improve messaging when ruleset load fails

This commit is contained in:
Dean Herbert 2022-11-01 13:57:34 +09:00
parent 4213abfc46
commit 706adfb28c
1 changed files with 3 additions and 3 deletions

View File

@ -158,7 +158,7 @@ private void addRuleset(Assembly assembly)
}
catch (Exception e)
{
LogFailedLoad(assembly.FullName, e);
LogFailedLoad(assembly.GetName().Name.Split('.').Last(), e);
}
}
@ -168,14 +168,14 @@ public void Dispose()
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
protected void Dispose(bool disposing)
{
AppDomain.CurrentDomain.AssemblyResolve -= resolveRulesetDependencyAssembly;
}
protected void LogFailedLoad(string name, Exception exception)
{
Logger.Log($"Could not load ruleset {name}. Please check for an update from the developer.", level: LogLevel.Error);
Logger.Log($"Could not load ruleset \"{name}\". Please check for an update from the developer.", level: LogLevel.Error);
Logger.Log($"Ruleset load failed: {exception}");
}