mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 16:27:26 +08:00
Fail requests taretting the fake API with a more deliberate exception
I think this feels better than relying on some other method to throw an exception.
This commit is contained in:
parent
45841673f6
commit
a2a057440e
@ -65,9 +65,7 @@ namespace osu.Game.Online.API
|
||||
{
|
||||
if (HandleRequest?.Invoke(request) != true)
|
||||
{
|
||||
// this will fail due to not receiving an APIAccess, and trigger a failure on the request.
|
||||
// this is intended - any request in testing that needs non-failures should use HandleRequest.
|
||||
request.Perform(this);
|
||||
request.Fail(new InvalidOperationException($@"{nameof(DummyAPIAccess)} cannot process this request."));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user