Log more update exceptions #611

This commit is contained in:
bao-qian
2016-05-10 19:24:15 +01:00
parent 0f1a1d5f56
commit 8325083402
2 changed files with 17 additions and 3 deletions

View File

@@ -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)
{

View File

@@ -91,6 +91,7 @@
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xaml" />
<Reference Include="System.Xml" />