From bdd618a99deaf091abb8626b3d094dbdf2b3f257 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Wed, 22 Aug 2018 15:42:43 +0900 Subject: [PATCH 1/2] Log the archive when failing to create model --- osu.Game/Beatmaps/BeatmapManager.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/osu.Game/Beatmaps/BeatmapManager.cs b/osu.Game/Beatmaps/BeatmapManager.cs index 1c28b533d2..e31746457a 100644 --- a/osu.Game/Beatmaps/BeatmapManager.cs +++ b/osu.Game/Beatmaps/BeatmapManager.cs @@ -350,7 +350,8 @@ namespace osu.Game.Beatmaps { // let's make sure there are actually .osu files to import. string mapName = reader.Filenames.FirstOrDefault(f => f.EndsWith(".osu")); - if (string.IsNullOrEmpty(mapName)) throw new InvalidOperationException("No beatmap files found in this beatmap archive."); + if (string.IsNullOrEmpty(mapName)) + throw new InvalidOperationException($"No beatmap files found in this beatmap archive. ({reader.Name})"); Beatmap beatmap; using (var stream = new StreamReader(reader.GetStream(mapName))) From f1c6dfd735e885178cc5b4dccea6c60a91167fcb Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 22 Aug 2018 16:22:29 +0900 Subject: [PATCH 2/2] Change grammar slightly --- osu.Game/Beatmaps/BeatmapManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Beatmaps/BeatmapManager.cs b/osu.Game/Beatmaps/BeatmapManager.cs index e31746457a..fc5a967f2d 100644 --- a/osu.Game/Beatmaps/BeatmapManager.cs +++ b/osu.Game/Beatmaps/BeatmapManager.cs @@ -351,7 +351,7 @@ namespace osu.Game.Beatmaps // let's make sure there are actually .osu files to import. string mapName = reader.Filenames.FirstOrDefault(f => f.EndsWith(".osu")); if (string.IsNullOrEmpty(mapName)) - throw new InvalidOperationException($"No beatmap files found in this beatmap archive. ({reader.Name})"); + throw new InvalidOperationException($"No beatmap files found in this beatmap archive ({reader.Name})."); Beatmap beatmap; using (var stream = new StreamReader(reader.GetStream(mapName)))