Skip to content

Commit

Permalink
Error handling on sign in
Browse files Browse the repository at this point in the history
  • Loading branch information
KMConner committed Jun 18, 2020
1 parent ae955d7 commit 4f208f7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ResourceDownloader/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@ public static void Main(string[] args)
string ecsId = Console.ReadLine();
string password = ShellMethods.EnterPassword("EnterPassword:");
var user = new SakaiUser(ecsId, password);
user.LogIn();
try
{
user.LogIn();
}
catch (Exception ex)
{
Console.WriteLine("Failed to sign in:\r\n" + ex.Message);
return;
}

// Get site list
SakaiSiteCollection collection = user.GetSites();
Expand Down

0 comments on commit 4f208f7

Please sign in to comment.