Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid switch causes an unhandled exception #58

Closed
gcorrall opened this issue Jul 5, 2024 · 4 comments
Closed

Invalid switch causes an unhandled exception #58

gcorrall opened this issue Jul 5, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@gcorrall
Copy link
Contributor

gcorrall commented Jul 5, 2024

Giving an invalid switch to powerjoular on the command line raises an unhandled exception, displaying:

raised GNAT.COMMAND_LINE.INVALID_SWITCH : g-comlin.adb:756

I think handling the 'Invalid_Switch' exception to show an appropriate error message (or displaying the help text) would be preferable (e.g. https://www.adacore.com/gems/gem-52).

@adelnoureddine adelnoureddine self-assigned this Jul 5, 2024
@adelnoureddine adelnoureddine added the enhancement New feature or request label Jul 5, 2024
@adelnoureddine
Copy link
Member

Thanks @gcorrall, I'll add handling these exceptions to the code.

@adelnoureddine
Copy link
Member

Fixed in 45c3119.

@gcorrall
Copy link
Contributor Author

gcorrall commented Jul 8, 2024

I think this change may have broken things somewhat; running powerjoular (with no switch or any valid switch) now exits immediately (whilst an invalid switch does display an error message).

@adelnoureddine adelnoureddine reopened this Jul 8, 2024
@adelnoureddine
Copy link
Member

Indeed, I just pushed a hotfix, should fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants