diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-06-27 11:37:50 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-06-27 11:37:50 -0400 |
commit | 7b6b2742f65ac1d2590357babc517b6cd9b69d04 (patch) | |
tree | 5cc4a521c39647bf90fb5a3f0985bd1e844695e8 | |
parent | a9958dac6acd23213649456fe4763f54d2672bcb (diff) | |
download | SMAPI-7b6b2742f65ac1d2590357babc517b6cd9b69d04.tar.gz SMAPI-7b6b2742f65ac1d2590357babc517b6cd9b69d04.tar.bz2 SMAPI-7b6b2742f65ac1d2590357babc517b6cd9b69d04.zip |
fix corrupted state exceptions not being logged by SMAPI
-rw-r--r-- | release-notes.md | 1 | ||||
-rw-r--r-- | src/StardewModdingAPI/Program.cs | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/release-notes.md b/release-notes.md index c76623b0..281c602c 100644 --- a/release-notes.md +++ b/release-notes.md @@ -27,6 +27,7 @@ For modders: * Fixed `SemanticVersion` parsing some invalid versions into close approximations (like `1.apple` → `1.0-apple`). * Fixed `SemanticVersion` not treating hyphens as separators when comparing prerelease tags. <small>_(While that was technically correct, it leads to unintuitive behaviour like sorting `-alpha-2` _after_ `-alpha-10`, even though `-alpha.2` sorts before `-alpha.10`.)_</small> +* Fixed corrupted state exceptions not being logged by SMAPI. ## 1.14 See [log](https://github.com/Pathoschild/SMAPI/compare/1.13...1.14). 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 } /// <summary>Launch SMAPI.</summary> + [HandleProcessCorruptedStateExceptions, SecurityCritical] // let try..catch handle corrupted state exceptions public void RunInteractively() { // initialise SMAPI |