CA2201: throw correct exception type.

This commit is contained in:
Huo Yaoyuan
2019-11-28 21:52:05 +08:00
parent ecfc6dfa3d
commit d7b3578cc6
4 changed files with 15 additions and 4 deletions

View File

@ -111,7 +111,7 @@ namespace osu.Game.Tests.Visual
foreach (var type in requiredGameDependencies)
{
if (game.Dependencies.Get(type) == null)
throw new Exception($"{type} has not been cached");
throw new InvalidOperationException($"{type} has not been cached");
}
return true;
@ -121,7 +121,7 @@ namespace osu.Game.Tests.Visual
foreach (var type in requiredGameBaseDependencies)
{
if (gameBase.Dependencies.Get(type) == null)
throw new Exception($"{type} has not been cached");
throw new InvalidOperationException($"{type} has not been cached");
}
return true;