Log error for invalid events

This commit is contained in:
David Zhao
2019-08-05 19:56:35 +09:00
parent 515d53c360
commit cd6fe91882
4 changed files with 1028 additions and 2 deletions

View File

@ -290,8 +290,12 @@ namespace osu.Game.Beatmaps.Formats
string[] split = line.Split(',');
EventType type;
if (!Enum.TryParse(split[0], out type))
throw new InvalidDataException($@"Unknown event type {split[0]}");
{
Logger.Log($"A beatmap event could not be parsed and will be ignored: {split[0]}", LoggingTarget.Runtime, LogLevel.Important);
return;
}
switch (type)
{