diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2018-12-14 00:42:00 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2018-12-14 00:42:00 -0500 |
commit | 0d26285da12156c6304c1ff4458bd0b62e6e8dca (patch) | |
tree | d330b0d7581b5d221e45efdaddf52ba39f0045ea /src/SMAPI/Framework/SCore.cs | |
parent | 8eee91c67db0f09e9c604c7b4a2809e5bc937258 (diff) | |
download | SMAPI-0d26285da12156c6304c1ff4458bd0b62e6e8dca.tar.gz SMAPI-0d26285da12156c6304c1ff4458bd0b62e6e8dca.tar.bz2 SMAPI-0d26285da12156c6304c1ff4458bd0b62e6e8dca.zip |
add friendly error when the game can't find its Content\XACT folder
Diffstat (limited to 'src/SMAPI/Framework/SCore.cs')
-rw-r--r-- | src/SMAPI/Framework/SCore.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs index e43d3f8b..3bc0aca4 100644 --- a/src/SMAPI/Framework/SCore.cs +++ b/src/SMAPI/Framework/SCore.cs @@ -313,6 +313,12 @@ namespace StardewModdingAPI.Framework this.Monitor.Log($"Technical details: {ex.GetLogSummary()}", LogLevel.Trace); this.PressAnyKeyToExit(); } + catch (FileNotFoundException ex) when (ex.Message == "Could not find file 'C:\\Program Files (x86)\\Steam\\SteamApps\\common\\Stardew Valley\\Content\\XACT\\FarmerSounds.xgs'.") // path in error is hardcoded regardless of install path + { + this.Monitor.Log("The game can't find its Content\\XACT\\FarmerSounds.xgs file. You can usually fix this by resetting your content files (see https://smapi.io/troubleshoot#reset-content ), or by uninstalling and reinstalling the game.", LogLevel.Error); + this.Monitor.Log($"Technical details: {ex.GetLogSummary()}", LogLevel.Trace); + this.PressAnyKeyToExit(); + } catch (Exception ex) { this.MonitorForGame.Log($"The game failed to launch: {ex.GetLogSummary()}", LogLevel.Error); |