File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -21,13 +21,24 @@ public static async Task<string> Scan()
21
21
22
22
isDownloadingUnityList = true ;
23
23
//SetStatus("Downloading list of Unity versions ...");
24
- string result ;
24
+ string result = null ;
25
25
// download list of Unity versions
26
26
using ( WebClient webClient = new WebClient ( ) )
27
27
{
28
-
29
28
Task < string > downloadStringTask = webClient . DownloadStringTaskAsync ( new Uri ( unityVersionsURL ) ) ;
30
- result = await downloadStringTask ;
29
+ try
30
+ {
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
+
31
42
isDownloadingUnityList = false ;
32
43
}
33
44
return result ;
You can’t perform that action at this time.
0 commit comments