CA2208: create exceptions correctly.

This commit is contained in:
Huo Yaoyuan
2019-11-28 22:21:21 +08:00
parent 09257b0c6d
commit d5994ed484
8 changed files with 8 additions and 9 deletions

View File

@ -15,7 +15,7 @@ namespace osu.Game.Screens.Play
: base(() => new ReplayPlayer(score))
{
if (score.Replay == null)
throw new ArgumentNullException(nameof(score.Replay), $"{nameof(score)} must have a non-null {nameof(score.Replay)}.");
throw new ArgumentException($"{nameof(score)} must have a non-null {nameof(score.Replay)}.", nameof(score));
scoreInfo = score.ScoreInfo;
}