From d1d82d2b4952a179b5d55ac6f1ed144d07770993 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 26 Sep 2023 15:00:56 +0900 Subject: [PATCH] Improve notification display when score import fails --- osu.Game/Database/RealmArchiveModelImporter.cs | 2 +- osu.Game/Scoring/ScoreImporter.cs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/osu.Game/Database/RealmArchiveModelImporter.cs b/osu.Game/Database/RealmArchiveModelImporter.cs index 9d06c14b4b..d2de00d476 100644 --- a/osu.Game/Database/RealmArchiveModelImporter.cs +++ b/osu.Game/Database/RealmArchiveModelImporter.cs @@ -149,7 +149,7 @@ await Task.WhenAll(tasks.Select(async task => return imported; } - notification.Text = $"{HumanisedModelName.Humanize(LetterCasing.Title)} import failed!"; + notification.Text = $"{HumanisedModelName.Humanize(LetterCasing.Title)} import failed! Check logs for more information."; notification.State = ProgressNotificationState.Cancelled; } else diff --git a/osu.Game/Scoring/ScoreImporter.cs b/osu.Game/Scoring/ScoreImporter.cs index b85b6a066e..5af53c6f7b 100644 --- a/osu.Game/Scoring/ScoreImporter.cs +++ b/osu.Game/Scoring/ScoreImporter.cs @@ -62,6 +62,11 @@ public ScoreImporter(RulesetStore rulesets, Func beatmaps, Stora api.Queue(req); return null; } + catch (Exception) + { + Logger.Log($@"Score '{archive.Name}' failed to import: failed to parse replay headers.", LoggingTarget.Database); + return null; + } } }