summaryrefslogtreecommitdiff
path: root/src/SMAPI/Program.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-10-30 18:15:26 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-10-30 18:15:26 -0400
commitcb74ce5a1716093818f7b4711af752d73e2187d9 (patch)
tree8d2a37ef8b0e554718895a83c2e3e35360e46aa1 /src/SMAPI/Program.cs
parent08c30eeffd8cc62d00db33d91e3a9a6ab1d376a3 (diff)
downloadSMAPI-cb74ce5a1716093818f7b4711af752d73e2187d9.tar.gz
SMAPI-cb74ce5a1716093818f7b4711af752d73e2187d9.tar.bz2
SMAPI-cb74ce5a1716093818f7b4711af752d73e2187d9.zip
improve update-check errors when connection is offline (#380)
Diffstat (limited to 'src/SMAPI/Program.cs')
-rw-r--r--src/SMAPI/Program.cs14
1 files changed, 11 insertions, 3 deletions
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();
}