From 737a434ad6704d22776f463c192b9a9748ce2a21 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 29 Jul 2021 22:50:50 -0400 Subject: reduce ErrorHandler's direct references to internal SMAPI code That will allow removing the InternalsVisibleTo attribute to avoid namespace conflicts in an upcoming commit. --- src/SMAPI.Mods.ErrorHandler/Patches/LoadErrorPatch.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/SMAPI.Mods.ErrorHandler/Patches') diff --git a/src/SMAPI.Mods.ErrorHandler/Patches/LoadErrorPatch.cs b/src/SMAPI.Mods.ErrorHandler/Patches/LoadErrorPatch.cs index e14dc662..cc0e5e52 100644 --- a/src/SMAPI.Mods.ErrorHandler/Patches/LoadErrorPatch.cs +++ b/src/SMAPI.Mods.ErrorHandler/Patches/LoadErrorPatch.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Linq; using HarmonyLib; +using Microsoft.Xna.Framework.Content; using StardewModdingAPI.Framework.Exceptions; using StardewModdingAPI.Framework.Patching; using StardewValley; @@ -82,7 +83,7 @@ namespace StardewModdingAPI.Mods.ErrorHandler.Patches { BluePrint _ = new BluePrint(building.buildingType.Value); } - catch (SContentLoadException) + catch (ContentLoadException) { LoadErrorPatch.Monitor.Log($"Removed invalid building type '{building.buildingType.Value}' in {location.Name} ({building.tileX}, {building.tileY}) to avoid a crash when loading save '{Constants.SaveFolderName}'. (Did you remove a custom building mod?)", LogLevel.Warn); location.buildings.Remove(building); -- cgit