diff options
-rw-r--r-- | docs/release-notes.md | 1 | ||||
-rw-r--r-- | src/SMAPI/Program.cs | 14 |
2 files changed, 12 insertions, 3 deletions
diff --git a/docs/release-notes.md b/docs/release-notes.md index c192d4ee..6a827b0f 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -5,6 +5,7 @@ * Added better Steam instructions to the SMAPI installer. * Renamed the default _TrainerMod_ mod to _Console Commands_ to clarify its purpose. * Hid the game's test messages from the console log. + * Improved update-check errors when connection is offline. * Fixed compatibility check crashing for players with Stardew Valley 1.08. * Fixed TrainerMod's `player_setlevel` command not also setting XP. diff --git a/src/SMAPI/Program.cs b/src/SMAPI/Program.cs index ce547d9b..b742467b 100644 --- a/src/SMAPI/Program.cs +++ b/src/SMAPI/Program.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; +using System.Net; using System.Reflection; using System.Runtime.ExceptionServices; using System.Security; @@ -518,8 +519,11 @@ namespace StardewModdingAPI } catch (Exception ex) { - this.Monitor.Log("Couldn't check for a new version of SMAPI. This won't affect your game, but you may not be notified of new versions if this keeps happening.", LogLevel.Warn); - this.Monitor.Log($"Error: {ex.GetLogSummary()}"); + this.Monitor.Log("Couldn't check for a new version of SMAPI. This won't affect your game, but you won't be notified of new versions if this keeps happening.", LogLevel.Warn); + this.Monitor.Log(ex is WebException && ex.InnerException == null + ? $"Error: {ex.Message}" + : $"Error: {ex.GetLogSummary()}" + ); } // check mod versions @@ -606,7 +610,11 @@ namespace StardewModdingAPI } catch (Exception ex) { - this.Monitor.Log($"Couldn't check for new mod versions:\n{ex.GetLogSummary()}", LogLevel.Trace); + this.Monitor.Log("Couldn't check for new mod versions. This won't affect your game, but you won't be notified of mod updates if this keeps happening.", LogLevel.Warn); + this.Monitor.Log(ex is WebException && ex.InnerException == null + ? ex.Message + : ex.ToString() + ); } }).Start(); } |