mirror of
https://github.com/ppy/osu.git
synced 2024-12-16 15:42:54 +08:00
Add error handling to import process (resolves await warning).
This commit is contained in:
parent
c24a4f57d9
commit
f5c27d99a4
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user