Add messages to all InvalidOperationExceptions

Without this, they can be very non-descript and hard to track down
This commit is contained in:
Dean Herbert
2022-06-28 01:34:24 +09:00
parent d43b980a17
commit 569fde4b47
8 changed files with 14 additions and 14 deletions

View File

@ -83,14 +83,14 @@ namespace osu.Game.Tests.NonVisual
public override event Action<JudgementResult> NewResult
{
add => throw new InvalidOperationException();
remove => throw new InvalidOperationException();
add => throw new InvalidOperationException($"{nameof(NewResult)} operations not supported in test context");
remove => throw new InvalidOperationException($"{nameof(NewResult)} operations not supported in test context");
}
public override event Action<JudgementResult> RevertResult
{
add => throw new InvalidOperationException();
remove => throw new InvalidOperationException();
add => throw new InvalidOperationException($"{nameof(RevertResult)} operations not supported in test context");
remove => throw new InvalidOperationException($"{nameof(RevertResult)} operations not supported in test context");
}
public override Playfield Playfield { get; }