Merge pull request #428 from peppy/general-fixes

Log errors with updating.
This commit is contained in:
Dean Herbert 2017-03-03 21:09:38 +09:00 committed by GitHub
commit 3c714fe056

View File

@ -18,6 +18,7 @@ using osu.Game.Graphics;
using OpenTK; using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
using System.Net.Http; using System.Net.Http;
using osu.Framework.Logging;
namespace osu.Desktop.Overlays namespace osu.Desktop.Overlays
{ {
@ -159,15 +160,21 @@ namespace osu.Desktop.Overlays
Schedule(() => notification.State = ProgressNotificationState.Completed); Schedule(() => notification.State = ProgressNotificationState.Completed);
} }
catch (Exception) catch (Exception e)
{ {
if (useDeltaPatching) if (useDeltaPatching)
{ {
Logger.Error(e, @"delta patching failed!");
//could fail if deltas are unavailable for full update path (https://github.com/Squirrel/Squirrel.Windows/issues/959) //could fail if deltas are unavailable for full update path (https://github.com/Squirrel/Squirrel.Windows/issues/959)
//try again without deltas. //try again without deltas.
checkForUpdateAsync(false, notification); checkForUpdateAsync(false, notification);
scheduleRetry = false; scheduleRetry = false;
} }
else
{
Logger.Error(e, @"update failed!");
}
} }
} }
catch (HttpRequestException) catch (HttpRequestException)