From 7b6b2742f65ac1d2590357babc517b6cd9b69d04 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Tue, 27 Jun 2017 11:37:50 -0400 Subject: fix corrupted state exceptions not being logged by SMAPI --- src/StardewModdingAPI/Program.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs index f313a9ac..7b843748 100644 --- a/src/StardewModdingAPI/Program.cs +++ b/src/StardewModdingAPI/Program.cs @@ -4,6 +4,8 @@ using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; using System.Reflection; +using System.Runtime.ExceptionServices; +using System.Security; using System.Threading; #if SMAPI_FOR_WINDOWS using System.Management; @@ -115,6 +117,7 @@ namespace StardewModdingAPI } /// Launch SMAPI. + [HandleProcessCorruptedStateExceptions, SecurityCritical] // let try..catch handle corrupted state exceptions public void RunInteractively() { // initialise SMAPI -- cgit