diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-03-12 01:31:15 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-03-12 01:31:15 -0500 |
commit | 6d2d90b7681e4e274e92742e98905ec4000486ca (patch) | |
tree | 80241918427c710303156d18f369f9b3b92717e6 /src/StardewModdingAPI/Program.cs | |
parent | b0fab4a0764d4cd1eb807db88e704aa401e4f716 (diff) | |
download | SMAPI-6d2d90b7681e4e274e92742e98905ec4000486ca.tar.gz SMAPI-6d2d90b7681e4e274e92742e98905ec4000486ca.tar.bz2 SMAPI-6d2d90b7681e4e274e92742e98905ec4000486ca.zip |
add logic to detect incompatible mod instructions & reject mod load (#247)
Diffstat (limited to 'src/StardewModdingAPI/Program.cs')
-rw-r--r-- | src/StardewModdingAPI/Program.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs index bf3c86fb..cb8cc2e5 100644 --- a/src/StardewModdingAPI/Program.cs +++ b/src/StardewModdingAPI/Program.cs @@ -453,6 +453,11 @@ namespace StardewModdingAPI { modAssembly = modAssemblyLoader.Load(assemblyPath); } + catch (IncompatibleInstructionException ex) + { + this.Monitor.Log($"{skippedPrefix} because it's not compatible with the latest version of the game (detected {ex.NounPhrase}). Please check for a newer version of the mod (you have v{manifest.Version}).", LogLevel.Error); + continue; + } catch (Exception ex) { this.Monitor.Log($"{skippedPrefix} because its DLL '{manifest.EntryDll}' couldn't be loaded.\n{ex.GetLogSummary()}", LogLevel.Error); |