mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 18:52:55 +08:00
Merge pull request #21045 from peppy/improve-ruleset-load-fail-message
Improve messaging when ruleset load fails
This commit is contained in:
commit
00bd77ce76
@ -158,7 +158,7 @@ namespace osu.Game.Rulesets
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
LogFailedLoad(assembly.FullName, e);
|
LogFailedLoad(assembly.GetName().Name.Split('.').Last(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,14 +168,14 @@ namespace osu.Game.Rulesets
|
|||||||
GC.SuppressFinalize(this);
|
GC.SuppressFinalize(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void Dispose(bool disposing)
|
protected void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
AppDomain.CurrentDomain.AssemblyResolve -= resolveRulesetDependencyAssembly;
|
AppDomain.CurrentDomain.AssemblyResolve -= resolveRulesetDependencyAssembly;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void LogFailedLoad(string name, Exception exception)
|
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}");
|
Logger.Log($"Ruleset load failed: {exception}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user