Skip to content

Commit

Permalink
Merge pull request #44 from CUMGroup/pw-43-exception-handling
Browse files Browse the repository at this point in the history
Added internal exception handling to keep the process up
  • Loading branch information
jas20202 authored Feb 24, 2024
2 parents e825387 + 05f4dd7 commit 0419773
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions PWManager.CLI/ConsoleRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,19 @@ public void Run(string[] args) {
continue;
}

exitCondition = ExecuteCommand(input);
try {
exitCondition = ExecuteCommand(input);
}catch (UserFeedbackException ex) {
Console.WriteLine(ex.Message);
if (_environment.RunningSession) {
exitCondition = ExitCondition.CONTINUE;
continue;
}

return;
}
}
}
catch (UserFeedbackException ex) {
Console.WriteLine(ex.Message);
}
catch (Exception ex) {
Console.WriteLine("An Error occured!");
if (_environment.IsDevelopmentMode) {
Expand Down

0 comments on commit 0419773

Please sign in to comment.