1
0
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:
Dean Herbert
2026-01-09 16:52:04 +09:00
Unverified
parent 5e4e28ef00
commit 576be6793b
+11 -1
View File
@@ -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;
}
}
}