1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-16 18:32:54 +08:00

Add error handling to import process (resolves await warning).

This commit is contained in:
Dean Herbert 2017-03-06 19:59:40 +09:00
parent c24a4f57d9
commit f5c27d99a4
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49

View File

@ -3,6 +3,7 @@
using System.Diagnostics;
using System.Threading.Tasks;
using osu.Framework.Logging;
using osu.Framework.Platform;
using osu.Game.Database;
@ -13,7 +14,7 @@ namespace osu.Game.IPC
private IpcChannel<BeatmapImportMessage> channel;
private BeatmapDatabase beatmaps;
public BeatmapImporter(GameHost host, BeatmapDatabase beatmaps = null)
public BeatmapImporter(GameHost host, BeatmapDatabase beatmaps = null)
{
this.beatmaps = beatmaps;
@ -35,7 +36,7 @@ namespace osu.Game.IPC
{
Debug.Assert(beatmaps != null);
ImportAsync(msg.Path);
ImportAsync(msg.Path).ContinueWith(t => Logger.Error(t.Exception, @"error during async import"), TaskContinuationOptions.OnlyOnFaulted);
}
}