1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 07:23:14 +08:00

Split exceptions back out to give better messaging

This commit is contained in:
Dean Herbert 2022-02-03 14:09:27 +09:00
parent 62fa915193
commit a69c7a9de6

View File

@ -400,7 +400,7 @@ namespace osu.Game.Online.API
{
if (state.Value == APIState.Offline)
{
failFromAPIOffline(request);
request.Fail(new WebException(@"User not logged in"));
return;
}
@ -419,7 +419,7 @@ namespace osu.Game.Online.API
if (failOldRequests)
{
foreach (var req in oldQueueRequests)
failFromAPIOffline(req);
req.Fail(new WebException($@"Request failed from flush operation (state {state.Value})"));
}
}
}
@ -440,13 +440,6 @@ namespace osu.Game.Online.API
flushQueue();
}
private void failFromAPIOffline(APIRequest req)
{
Debug.Assert(state.Value == APIState.Offline);
req.Fail(new WebException(@"User not logged in"));
}
private static APIUser createGuestUser() => new GuestUser();
protected override void Dispose(bool isDisposing)