Skip to content

Commit

Permalink
Merge pull request #1291 from Postremus/#1238
Browse files Browse the repository at this point in the history
Catch WebException when downloading metadata
  • Loading branch information
RichardLake committed Jul 17, 2015
2 parents 1db579e + 181b89f commit 81fc312
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Core/Net/Repo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,16 @@ internal static void UpdateRegistry(Uri repo, Registry registry, KSP ksp, IUser
{
log.InfoFormat("Downloading {0}", repo);

string repo_file = Net.Download(repo);
string repo_file = String.Empty;
try
{
repo_file = Net.Download(repo);
}
catch (System.Net.WebException)
{
user.RaiseMessage("Connection to {0} could not be established.", repo);
return;
}

// Clear our list of known modules.
var old_available = registry.available_modules;
Expand Down

0 comments on commit 81fc312

Please sign in to comment.