From 6a6790682391da5068cec86787020dd297a08174 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 17 May 2025 12:03:30 +0100 Subject: [PATCH] Improve --check-yaml robustness against bogus maps. --- OpenRA.Mods.Common/UtilityCommands/CheckYaml.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.Common/UtilityCommands/CheckYaml.cs b/OpenRA.Mods.Common/UtilityCommands/CheckYaml.cs index 3828d73dec..ab65a10513 100644 --- a/OpenRA.Mods.Common/UtilityCommands/CheckYaml.cs +++ b/OpenRA.Mods.Common/UtilityCommands/CheckYaml.cs @@ -100,8 +100,15 @@ namespace OpenRA.Mods.Common.UtilityCommands if (package == null) continue; - using (var testMap = new Map(modData, package)) - TestMap(testMap, modData); + try + { + using (var testMap = new Map(modData, package)) + TestMap(testMap, modData); + } + catch (Exception e) + { + EmitError($"Failed to load map {map.Map} with exception: {e}"); + } } if (errors > 0)