Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix audio in video check crashing on unexpected failures #27600

Merged
merged 1 commit into from Mar 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions osu.Game/Rulesets/Edit/Checks/CheckAudioInVideo.cs
@@ -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;
Expand Down Expand Up @@ -75,6 +77,11 @@ public IEnumerable<Issue> Run(BeatmapVerifierContext context)
{
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;
}
Expand Down