mirror of
https://github.com/osukey/osukey.git
synced 2025-05-25 23:47:30 +09: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)
|
if (state.Value == APIState.Offline)
|
||||||
{
|
{
|
||||||
failFromAPIOffline(request);
|
request.Fail(new WebException(@"User not logged in"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -419,7 +419,7 @@ namespace osu.Game.Online.API
|
|||||||
if (failOldRequests)
|
if (failOldRequests)
|
||||||
{
|
{
|
||||||
foreach (var req in oldQueueRequests)
|
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();
|
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();
|
private static APIUser createGuestUser() => new GuestUser();
|
||||||
|
|
||||||
protected override void Dispose(bool isDisposing)
|
protected override void Dispose(bool isDisposing)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user