From 5e3a1abbd421196ee63442c82cb6606b6630a6ca Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 26 Jun 2021 11:16:12 -0400 Subject: improve error if SMAPI fails to dispose on exit --- src/SMAPI/Framework/SCore.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs index 2de2b21a..c3285979 100644 --- a/src/SMAPI/Framework/SCore.cs +++ b/src/SMAPI/Framework/SCore.cs @@ -297,7 +297,14 @@ namespace StardewModdingAPI.Framework } finally { - this.Dispose(); + try + { + this.Dispose(); + } + catch (Exception ex) + { + this.Monitor.Log($"The game ended, but SMAPI wasn't able to dispose correctly. Technical details: {ex}", LogLevel.Error); + } } } -- cgit