1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 13:27:23 +08:00

Add more detail to log output when beatmap parsing errors occur (#5680)

Add more detail to log output when beatmap parsing errors occur

Co-authored-by: Dean Herbert <pe@ppy.sh>
This commit is contained in:
Dean Herbert 2019-08-12 01:52:21 +09:00 committed by GitHub
commit 907cf18960
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -60,5 +60,7 @@ namespace osu.Game.Beatmaps
public class Beatmap : Beatmap<HitObject> public class Beatmap : Beatmap<HitObject>
{ {
public new Beatmap Clone() => (Beatmap)base.Clone(); public new Beatmap Clone() => (Beatmap)base.Clone();
public override string ToString() => BeatmapInfo?.ToString() ?? base.ToString();
} }
} }

View File

@ -36,7 +36,7 @@ namespace osu.Game.Beatmaps.Formats
{ {
if (!Enum.TryParse(line.Substring(1, line.Length - 2), out section)) if (!Enum.TryParse(line.Substring(1, line.Length - 2), out section))
{ {
Logger.Log($"Unknown section \"{line}\" in {output}"); Logger.Log($"Unknown section \"{line}\" in \"{output}\"");
section = Section.None; section = Section.None;
} }
@ -49,7 +49,7 @@ namespace osu.Game.Beatmaps.Formats
} }
catch (Exception e) catch (Exception e)
{ {
Logger.Log($"Failed to process line \"{line}\" into {output}: {e.Message}", LoggingTarget.Runtime, LogLevel.Important); Logger.Log($"Failed to process line \"{line}\" into \"{output}\": {e.Message}", LoggingTarget.Runtime, LogLevel.Important);
} }
} }
} }