From 7c9336e3b140ea8d343d7abcc5c166016136d7b7 Mon Sep 17 00:00:00 2001 From: Zoryn Aaron Date: Wed, 23 Mar 2016 16:43:36 -0400 Subject: [PATCH] errors now tell you the dll that errored not the manifest --- StardewModdingAPI/Constants.cs | 2 +- StardewModdingAPI/Program.cs | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/StardewModdingAPI/Constants.cs b/StardewModdingAPI/Constants.cs index cffb711e..a29e5fa8 100644 --- a/StardewModdingAPI/Constants.cs +++ b/StardewModdingAPI/Constants.cs @@ -44,7 +44,7 @@ namespace StardewModdingAPI /// public static string LogPath => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "StardewValley", "ErrorLogs"); - public static readonly Version Version = new Version(0, 39, 1, "Alpha"); + public static readonly Version Version = new Version(0, 39, 2, "Alpha"); /// /// Not quite "constant", but it makes more sense for it to be here, at least for now diff --git a/StardewModdingAPI/Program.cs b/StardewModdingAPI/Program.cs index 41d137d4..4d1d23d1 100644 --- a/StardewModdingAPI/Program.cs +++ b/StardewModdingAPI/Program.cs @@ -303,12 +303,13 @@ namespace StardewModdingAPI Log.Error("Failed to create psconfigs directory '{0}'. Exception details:\n" + ex, Path.GetDirectoryName(s)); continue; } + string targDll = string.Empty; try { - string targDll = Path.Combine(Path.GetDirectoryName(s), manifest.EntryDll); + targDll = Path.Combine(Path.GetDirectoryName(s), manifest.EntryDll); if (!File.Exists(targDll)) { - Log.Error("Failed to load mod '{0}'. File {1} does not exist!", s, targDll); + Log.Error("Failed to load mod '{0}'. File {1} does not exist!", manifest.EntryDll, targDll); continue; } @@ -332,7 +333,7 @@ namespace StardewModdingAPI } catch (Exception ex) { - Log.Error("Failed to load mod '{0}'. Exception details:\n" + ex, s); + Log.Error("Failed to load mod '{0}'. Exception details:\n" + ex, targDll); } } }