We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c1e1ae4 commit 48976a0Copy full SHA for 48976a0
UnityLauncherPro/GetUnityUpdates.cs
@@ -21,13 +21,24 @@ public static async Task<string> Scan()
21
22
isDownloadingUnityList = true;
23
//SetStatus("Downloading list of Unity versions ...");
24
- string result;
+ string result = null;
25
// download list of Unity versions
26
using (WebClient webClient = new WebClient())
27
{
28
-
29
Task<string> downloadStringTask = webClient.DownloadStringTaskAsync(new Uri(unityVersionsURL));
30
- result = await downloadStringTask;
+ try
+ {
31
+ result = await downloadStringTask;
32
+ }
33
+ catch (WebException)
34
35
+ Console.WriteLine("It's a web exception");
36
37
+ catch (Exception)
38
39
+ Console.WriteLine("It's not a web exception");
40
41
+
42
isDownloadingUnityList = false;
43
}
44
return result;
0 commit comments