diff --git a/osu.Game/Screens/OnlinePlay/Playlists/PlaylistItemResultsScreen.cs b/osu.Game/Screens/OnlinePlay/Playlists/PlaylistItemResultsScreen.cs index 53cd81b2a1..572bf535f7 100644 --- a/osu.Game/Screens/OnlinePlay/Playlists/PlaylistItemResultsScreen.cs +++ b/osu.Game/Screens/OnlinePlay/Playlists/PlaylistItemResultsScreen.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; +using osu.Framework.Logging; using osu.Game.Beatmaps; using osu.Game.Database; using osu.Game.Graphics.UserInterface; @@ -131,10 +132,6 @@ namespace osu.Game.Screens.OnlinePlay.Playlists return await transformScores(allScores).ConfigureAwait(false); } - catch (OperationCanceledException) - { - return []; - } catch { return await fetchScoresAround().ConfigureAwait(false); @@ -192,8 +189,9 @@ namespace osu.Game.Screens.OnlinePlay.Playlists return await transformScores(index.Scores).ConfigureAwait(false); } - catch (OperationCanceledException) + catch (Exception ex) { + Logger.Log($"Failed to fetch scores (room: {RoomId}, item: {PlaylistItem.ID}): {ex}"); return []; } } @@ -242,7 +240,10 @@ namespace osu.Game.Screens.OnlinePlay.Playlists foreach (int id in allBeatmapIds) { if (!beatmapsById.ContainsKey(id)) - throw new MissingBeatmapException(PlaylistItem, id); + { + Logger.Log($"Failed to fetch beatmap {id} to display scores for playlist item {PlaylistItem.ID}"); + beatmapsById[id] = Beatmap.Value.BeatmapInfo; + } } // Exclude the score provided to this screen since it's added already. @@ -313,13 +314,5 @@ namespace osu.Game.Screens.OnlinePlay.Playlists X = (float)(list.ScrollableExtent - list.Current - panelOffset); } } - - private class MissingBeatmapException : Exception - { - public MissingBeatmapException(PlaylistItem item, int beatmapId) - : base($"Missing beatmap {beatmapId} for playlist item {item.ID}") - { - } - } } } diff --git a/osu.Game/Screens/Ranking/SoloResultsScreen.cs b/osu.Game/Screens/Ranking/SoloResultsScreen.cs index 73bed3383b..3486d81e8a 100644 --- a/osu.Game/Screens/Ranking/SoloResultsScreen.cs +++ b/osu.Game/Screens/Ranking/SoloResultsScreen.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Threading.Tasks; using osu.Framework.Allocation; +using osu.Framework.Logging; using osu.Game.Beatmaps; using osu.Game.Extensions; using osu.Game.Online.API; @@ -72,8 +73,9 @@ namespace osu.Game.Screens.Ranking return toDisplay.ToArray(); } - catch (OperationCanceledException) + catch (Exception ex) { + Logger.Log($"Failed to fetch scores (beatmap: {Score.BeatmapInfo}, ruleset: {Score.Ruleset}): {ex}"); return []; } }