From 83250834022d8b6778312068cb8e62d417e8b8ab Mon Sep 17 00:00:00 2001 From: bao-qian Date: Tue, 10 May 2016 19:24:15 +0100 Subject: [PATCH] Log more update exceptions #611 --- Wox.Core/Updater.cs | 19 ++++++++++++++++--- Wox.Core/Wox.Core.csproj | 1 + 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/Wox.Core/Updater.cs b/Wox.Core/Updater.cs index 0c142da102..ab07821c00 100644 --- a/Wox.Core/Updater.cs +++ b/Wox.Core/Updater.cs @@ -1,6 +1,8 @@ using System; using System.Diagnostics; using System.Net; +using System.Net.Http; +using System.Net.Sockets; using System.Threading.Tasks; using Newtonsoft.Json; using Newtonsoft.Json.Linq; @@ -23,14 +25,25 @@ namespace Wox.Core try { // todo 5/9 the return value of UpdateApp() is NULL, fucking useless! - using (var updater= await UpdateManager.GitHubUpdateManager(Infrastructure.Wox.Github, urlDownloader:downloader)) + using ( + var updater = + await UpdateManager.GitHubUpdateManager(Infrastructure.Wox.Github, urlDownloader: downloader)) { await updater.UpdateApp(); } } - catch (WebException ex) + catch (HttpRequestException he) { - Log.Error(ex); + Log.Error(he); + } + catch (WebException we) + { + Log.Error(we); + } + catch (SocketException sc) + { + Log.Info("Socket exception happened!, which method cause this exception??"); + Log.Error(sc); } catch (Exception exception) { diff --git a/Wox.Core/Wox.Core.csproj b/Wox.Core/Wox.Core.csproj index 2ce8b41646..7debf7a622 100644 --- a/Wox.Core/Wox.Core.csproj +++ b/Wox.Core/Wox.Core.csproj @@ -91,6 +91,7 @@ +