mirror of
https://github.com/ppy/osu.git
synced 2026-06-03 19:24:24 +08:00
Add proper logging of failed scenario in OnlineLookupCache
This commit is contained in:
@@ -8,6 +8,8 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Extensions;
|
||||
using osu.Framework.Extensions.ExceptionExtensions;
|
||||
using osu.Framework.Logging;
|
||||
using osu.Game.Online.API;
|
||||
|
||||
namespace osu.Game.Database
|
||||
@@ -163,6 +165,14 @@ namespace osu.Game.Database
|
||||
}
|
||||
}
|
||||
|
||||
private void createNewTask() => pendingRequestTask = Task.Run(performLookup);
|
||||
private void createNewTask()
|
||||
{
|
||||
var nextTask = Task.Run(performLookup);
|
||||
nextTask.ContinueWith(t =>
|
||||
{
|
||||
Logger.Error(t.Exception.AsSingular(), $"{nameof(OnlineLookupCache<TLookup, TValue, TRequest>)} lookup request failed!");
|
||||
}, TaskContinuationOptions.OnlyOnFaulted);
|
||||
pendingRequestTask = nextTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user