From 20c760835ab81c4a90c46656f69d8b59b0903fc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Wed, 13 Mar 2024 13:55:49 +0100 Subject: [PATCH] Fix audio in video check crashing on unexpected failures --- osu.Game/Rulesets/Edit/Checks/CheckAudioInVideo.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/osu.Game/Rulesets/Edit/Checks/CheckAudioInVideo.cs b/osu.Game/Rulesets/Edit/Checks/CheckAudioInVideo.cs index f712a7867d..38976dd4b5 100644 --- a/osu.Game/Rulesets/Edit/Checks/CheckAudioInVideo.cs +++ b/osu.Game/Rulesets/Edit/Checks/CheckAudioInVideo.cs @@ -1,8 +1,10 @@ // Copyright (c) ppy Pty Ltd . 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; }