mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 11:35:35 +08:00
Catch errors during score parsing
This commit is contained in:
parent
76df11c398
commit
67562a3856
@ -911,10 +911,17 @@ namespace osu.Game.Database
|
|||||||
if (stream == null)
|
if (stream == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
int version = new ReplayVersionParser().Parse(stream);
|
int version = new ReplayVersionParser().Parse(stream);
|
||||||
if (version < LegacyScoreEncoder.FIRST_LAZER_VERSION)
|
if (version < LegacyScoreEncoder.FIRST_LAZER_VERSION)
|
||||||
score.IsLegacyScore = true;
|
score.IsLegacyScore = true;
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Logger.Error(e, $"Failed to read replay {replayFilename}", LoggingTarget.Database);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user