Skip to content

Commit

Permalink
Fix: program continues after finishing download
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedayman4a committed Mar 22, 2020
1 parent 5e43dd6 commit 51d19a5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions LyndaCoursesDownloader.ConsoleDownloader/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,15 @@ private static void RunWithConfig(Config config)
TUI.ShowError("Error details : " + ex.StackTrace);
TUI.ShowError("Trying again...");
RunWithConfig(config);
return;
}
catch (Exception ex)
{
TUI.ShowError("An error occured while extracting the course data : " + ex.Message);
TUI.ShowError("Error details : " + ex.StackTrace);
TUI.ShowError("Trying again...");
RunWithConfig(config);
return;
}


Expand All @@ -150,12 +152,14 @@ private static void RunWithConfig(Config config)
TUI.ShowError("Error details : " + ex.StackTrace);
TUI.ShowError("Trying again...");
RunWithConfig(config);
return;
}
catch (Exception ex)
{
TUI.ShowError("An error occured : " + ex.Message);
TUI.ShowError("Error details : " + ex.StackTrace);
RunWithConfig(config);
return;
}

}
Expand Down Expand Up @@ -220,12 +224,14 @@ private static void RunWithoutConfig()
TUI.ShowError("Error details : " + ex.StackTrace);
TUI.ShowError("Trying again...");
RunWithoutConfig();
return;
}
catch (Exception ex)
{
TUI.ShowError("An error occured : " + ex.Message);
TUI.ShowError("Error details : " + ex.StackTrace);
RunWithoutConfig();
return;
}
}
}
Expand Down

0 comments on commit 51d19a5

Please sign in to comment.