summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-06-26 11:16:12 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-06-26 11:16:12 -0400
commit5e3a1abbd421196ee63442c82cb6606b6630a6ca (patch)
tree3e5019416172ca61672f14dece1262e9b1d6ad94 /src
parent66f8920c29567de615dbcb0a06e78f774d128f6b (diff)
downloadSMAPI-5e3a1abbd421196ee63442c82cb6606b6630a6ca.tar.gz
SMAPI-5e3a1abbd421196ee63442c82cb6606b6630a6ca.tar.bz2
SMAPI-5e3a1abbd421196ee63442c82cb6606b6630a6ca.zip
improve error if SMAPI fails to dispose on exit
Diffstat (limited to 'src')
-rw-r--r--src/SMAPI/Framework/SCore.cs9
1 files changed, 8 insertions, 1 deletions
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);
+ }
}
}