Log the archive when failing to create model

This commit is contained in:
smoogipoo 2018-08-22 15:42:43 +09:00
parent 47ec139700
commit bdd618a99d
1 changed files with 2 additions and 1 deletions

View File

@ -350,7 +350,8 @@ protected override BeatmapSetInfo CreateModel(ArchiveReader reader)
{
// 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)))