1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 06:52:55 +08:00

Catch errors during score parsing

This commit is contained in:
Dan Balasescu 2023-06-09 14:35:29 +09:00
parent 76df11c398
commit 67562a3856

View File

@ -911,9 +911,16 @@ namespace osu.Game.Database
if (stream == null)
continue;
int version = new ReplayVersionParser().Parse(stream);
if (version < LegacyScoreEncoder.FIRST_LAZER_VERSION)
score.IsLegacyScore = true;
try
{
int version = new ReplayVersionParser().Parse(stream);
if (version < LegacyScoreEncoder.FIRST_LAZER_VERSION)
score.IsLegacyScore = true;
}
catch (Exception e)
{
Logger.Error(e, $"Failed to read replay {replayFilename}", LoggingTarget.Database);
}
}
}