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:
parent
62fa915193
commit
a69c7a9de6
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user