Skip to content

Commit 02ec47f

Browse files
committed
Add error message for when component list could not be downloaded
1 parent feac619 commit 02ec47f

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/Forms/MainDownload.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@ private async void Main_Load(object sender, EventArgs e)
1919
FPM.VerifyDestinationPath(Path.GetPathRoot(AppDomain.CurrentDomain.BaseDirectory), true);
2020

2121
Stream listStream = await new DownloadService().DownloadFileTaskAsync(FPM.ListURL);
22+
23+
if (listStream == null)
24+
{
25+
MessageBox.Show(
26+
"The component list could not be downloaded! Do you have an internet connection?",
27+
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error
28+
);
29+
30+
Environment.Exit(1);
31+
}
32+
2233
listStream.Position = 0;
2334

2435
FPM.XmlTree = new XmlDocument();

0 commit comments

Comments
 (0)