diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-08-21 14:22:19 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-08-21 14:22:19 -0400 |
commit | 80fe706f19d95ef2d00887344bcbc2a064a04541 (patch) | |
tree | e80dc30e52b2680391aaff9ee65c02ede2f5ee64 /src/StardewModdingAPI/Program.cs | |
parent | 723ddc255e1c2b399dfb734306fd00912a741e62 (diff) | |
download | SMAPI-80fe706f19d95ef2d00887344bcbc2a064a04541.tar.gz SMAPI-80fe706f19d95ef2d00887344bcbc2a064a04541.tar.bz2 SMAPI-80fe706f19d95ef2d00887344bcbc2a064a04541.zip |
show friendlier error when players have two copies of a mod
Diffstat (limited to 'src/StardewModdingAPI/Program.cs')
-rw-r--r-- | src/StardewModdingAPI/Program.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs index 57ff011f..108e9273 100644 --- a/src/StardewModdingAPI/Program.cs +++ b/src/StardewModdingAPI/Program.cs @@ -15,6 +15,7 @@ using Newtonsoft.Json; using StardewModdingAPI.AssemblyRewriters; using StardewModdingAPI.Events; using StardewModdingAPI.Framework; +using StardewModdingAPI.Framework.Exceptions; using StardewModdingAPI.Framework.Logging; using StardewModdingAPI.Framework.Models; using StardewModdingAPI.Framework.ModHelpers; @@ -655,6 +656,11 @@ namespace StardewModdingAPI #endif continue; } + catch (SAssemblyLoadFailedException ex) + { + TrackSkip(metadata, $"its DLL '{manifest.EntryDll}' couldn't be loaded: {ex.Message}"); + continue; + } catch (Exception ex) { TrackSkip(metadata, $"its DLL '{manifest.EntryDll}' couldn't be loaded:\n{ex.GetLogSummary()}"); |