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()
2121
2222 isDownloadingUnityList = true ;
2323 //SetStatus("Downloading list of Unity versions ...");
24- string result ;
24+ string result = null ;
2525 // download list of Unity versions
2626 using ( WebClient webClient = new WebClient ( ) )
2727 {
28-
2928 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+
3142 isDownloadingUnityList = false ;
3243 }
3344 return result ;
You can’t perform that action at this time.
0 commit comments