Skip to content

Commit

Permalink
Rely on System exceptions to provide info on what went wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
synhershko committed Jul 3, 2012
1 parent b127c7f commit a2c26cb
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/NAppUpdate.Framework/Sources/SimpleWebSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,8 @@ public bool GetData(string url, string baseUrl, Action<UpdateProgressInfo> onPro
fd = new FileDownloader(url);
else if (Uri.IsWellFormedUriString(baseUrl, UriKind.Absolute))
fd = new FileDownloader(new Uri(new Uri(baseUrl, UriKind.Absolute), url));
else if (Uri.IsWellFormedUriString(new Uri(new Uri(baseUrl), url).AbsoluteUri, UriKind.Absolute))
fd = new FileDownloader(new Uri(new Uri(baseUrl), url));

if (fd == null)
throw new ArgumentException("The requested URI does not look valid: " + url, "url");
else
fd = string.IsNullOrEmpty(baseUrl) ? new FileDownloader(url) : new FileDownloader(new Uri(new Uri(baseUrl), url));

fd.Proxy = Proxy;

Expand Down

0 comments on commit a2c26cb

Please sign in to comment.