mirror of https://github.com/ppy/osu
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:
commit
907cf18960
|
@ -60,5 +60,7 @@ public class Beatmap<T> : IBeatmap
|
||||||
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ protected override void ParseStreamInto(StreamReader stream, T output)
|
||||||
{
|
{
|
||||||
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 @@ protected override void ParseStreamInto(StreamReader stream, T output)
|
||||||
}
|
}
|
||||||
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue