mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-09 12:46:47 +02:00
fix can't catch exception issue
- Origin code can't catch exception in code, and all exceptions goes into first chance exception hanlding. - releated: #1266 - http://stackoverflow.com/a/5383408/2833083 - https://msdn.microsoft.com/en-us/magazine/jj991977.aspx?f=255&MSPPError=-2147217396
This commit is contained in:
@@ -14,8 +14,7 @@ namespace Wox.Core
|
||||
{
|
||||
public static class Updater
|
||||
{
|
||||
[Conditional("RELEASE")]
|
||||
public static async void UpdateApp()
|
||||
public static async Task UpdateApp()
|
||||
{
|
||||
|
||||
var client = new WebClient { Proxy = Http.WebProxy() };
|
||||
@@ -24,9 +23,7 @@ namespace Wox.Core
|
||||
try
|
||||
{
|
||||
// todo 5/9 the return value of UpdateApp() is NULL, fucking useless!
|
||||
using (
|
||||
var updater =
|
||||
await UpdateManager.GitHubUpdateManager(Infrastructure.Constant.Github, urlDownloader: downloader))
|
||||
using (var updater = await UpdateManager.GitHubUpdateManager(Infrastructure.Constant.Github, urlDownloader: downloader))
|
||||
{
|
||||
await updater.UpdateApp();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user