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

Fix audio in video check crashing on unexpected failures

This commit is contained in:
Bartłomiej Dach 2024-03-13 13:55:49 +01:00
parent c575cce10c
commit 20c760835a
No known key found for this signature in database

View File

@ -1,8 +1,10 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Collections.Generic;
using System.IO;
using osu.Framework.Logging;
using osu.Game.Beatmaps;
using osu.Game.IO.FileAbstraction;
using osu.Game.Rulesets.Edit.Checks.Components;
@ -75,6 +77,11 @@ namespace osu.Game.Rulesets.Edit.Checks
{
issue = new IssueTemplateFileError(this).Create(filename, "Unsupported format");
}
catch (Exception ex)
{
issue = new IssueTemplateFileError(this).Create(filename, "Internal failure - see logs for more info");
Logger.Log($"Failed when running {nameof(CheckAudioInVideo)}: {ex}");
}
yield return issue;
}