mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Standardise usages of exceptions.
This commit is contained in:
@ -90,7 +90,7 @@ namespace osu.Game.Screens.Play
|
||||
Beatmap = beatmaps.GetWorkingBeatmap(BeatmapInfo, withStoryboard: true);
|
||||
|
||||
if (Beatmap?.Beatmap == null)
|
||||
throw new Exception("Beatmap was not loaded");
|
||||
throw new InvalidOperationException("Beatmap was not loaded");
|
||||
|
||||
ruleset = osu?.Ruleset.Value ?? Beatmap.BeatmapInfo.Ruleset;
|
||||
rulesetInstance = ruleset.CreateInstance();
|
||||
@ -109,7 +109,7 @@ namespace osu.Game.Screens.Play
|
||||
}
|
||||
|
||||
if (!HitRenderer.Objects.Any())
|
||||
throw new Exception("Beatmap contains no hit objects!");
|
||||
throw new InvalidOperationException("Beatmap contains no hit objects!");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
Reference in New Issue
Block a user