improve error if SMAPI fails to dispose on exit

This commit is contained in:
Jesse Plamondon-Willard 2021-06-26 11:16:12 -04:00
parent 66f8920c29
commit 5e3a1abbd4
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
2 changed files with 12 additions and 4 deletions

View File

@ -9,6 +9,7 @@
## Upcoming release ## Upcoming release
* For players: * For players:
* Improved error if SMAPI fails to dispose on game exit.
* Fixed error when running the Windows installer as administrator (thanks to LostLogic!). * Fixed error when running the Windows installer as administrator (thanks to LostLogic!).
* Fixed `player_add` and `list_items` console commands not including some shirts _(in Console Commands)_. * Fixed `player_add` and `list_items` console commands not including some shirts _(in Console Commands)_.
* Fixed installer error on some older Windows systems (thanks to eddyballs!). * Fixed installer error on some older Windows systems (thanks to eddyballs!).
@ -18,14 +19,14 @@
* Added asset propagation for building/house paint masks. * Added asset propagation for building/house paint masks.
* Added validation for the manifest `Dependencies` field. * Added validation for the manifest `Dependencies` field.
* Added `TRACE` message if software known to cause issues is installed (currently MSI Afterburner and RivaTuner), to simplify troubleshooting. * Added `TRACE` message if software known to cause issues is installed (currently MSI Afterburner and RivaTuner), to simplify troubleshooting.
* Fixed [JSON schema](technical/web.md#using-a-schema-file-directly) in Visual Studio Code warning about comments or trailing commas.
* Fixed JSON schema for `i18n` files requiring the wrong value for the `$schema` field.
* Fixed validation for mods with version `0.0.0`. * Fixed validation for mods with version `0.0.0`.
* Fixed _loaded with custom settings_ trace log when using default settings. * Fixed _loaded with custom settings_ trace log when using default settings.
* Fixed `Constants.SaveFolderName` and `Constants.CurrentSavePath` not set correctly in rare cases. * Fixed `Constants.SaveFolderName` and `Constants.CurrentSavePath` not set correctly in rare cases.
* For the web UI: * For the web UI and JSON validator:
* Updated the JSON validator/schema for Content Patcher 1.23. * Updated the JSON validator/schema for Content Patcher 1.23.
* Fixed [JSON schema](technical/web.md#using-a-schema-file-directly) in Visual Studio Code warning about comments or trailing commas.
* Fixed JSON schema for `i18n` files requiring the wrong value for the `$schema` field.
## 3.10.1 ## 3.10.1
Released 03 May 2021 for Stardew Valley 1.5.4 or later. Released 03 May 2021 for Stardew Valley 1.5.4 or later.

View File

@ -297,7 +297,14 @@ namespace StardewModdingAPI.Framework
} }
finally 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);
}
} }
} }