Skip to content
This repository has been archived by the owner on May 13, 2021. It is now read-only.

Catch exception when downloading vscode files #29

Merged
merged 1 commit into from
Dec 30, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion DotNet/WPILibInstaller/Selector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading;
using System.Windows.Forms;
Expand Down Expand Up @@ -45,7 +46,14 @@ private async void downloadButton_Click(object sender, EventArgs e)
source?.Cancel();
source = new CancellationTokenSource();

var res = await vsf.DownloadAndZipFiles(progressBar4, progressBar5, source.Token);
string res = null;

try
{
res = await vsf.DownloadAndZipFiles(progressBar4, progressBar5, source.Token);
} catch (HttpRequestException)
{
}

if (res == null)
{
Expand Down