Skip to content

Commit

Permalink
Handle exception for invalid command line arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
adelnoureddine committed Jul 8, 2024
1 parent 11445e4 commit 45c3119
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/powerjoular.adb
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ begin
exit;
end case;
end loop;
exception
when Invalid_Switch | Invalid_Parameter =>
Put_Line ("Invalid command line option, or option not used properly.");
OS_Exit (0);

if (Argument_Count = 0) then
Show_Terminal := True;
Expand Down

0 comments on commit 45c3119

Please sign in to comment.