Skip to content

Commit

Permalink
Improved message formatting, and removed error message with more user…
Browse files Browse the repository at this point in the history
… friendly data.
  • Loading branch information
wmcnamara committed Dec 14, 2020
1 parent f543f10 commit e5d825c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,19 @@ async static Task Main(string[] args)
//After displaying that, download the background, and set the desktop background with the new image.
using (var client = new WebClient())
{
Console.WriteLine("Downloading Background...");
Console.WriteLine("Downloading Background... \n");
client.DownloadFile(apod.hdurl, "bg.jpg");
SetDesktopBackground(Path.GetFullPath("bg.jpg"));
}
}
catch (Exception e)
{
Console.WriteLine("\nException Caught!");
Console.WriteLine("Message :{0} ", e.Message);
Console.WriteLine("If you're seeing this, its quite likely that the APOD today is not a format that can be set to a desktop background, such as a video.");
Console.ReadKey();
//Console.WriteLine("\nException Caught!");
//Console.WriteLine("Message :{0} ", e.Message);
Console.WriteLine("The APOD today is not a format that can be set to a desktop background, such as a video. Please visit the official APOD website to view todays APOD. \n\nhttps://apod.nasa.gov/apod/astropix.html" );
}

Console.WriteLine("Press Any Key To Close");
Console.WriteLine("\nPress Any Key To Close");
Console.ReadKey();
}

Expand Down

0 comments on commit e5d825c

Please sign in to comment.