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

Unexpected internal error if specifying invalid command line option #647

Closed
kumattau opened this issue Apr 19, 2022 · 3 comments · Fixed by #650 or #653
Closed

Unexpected internal error if specifying invalid command line option #647

kumattau opened this issue Apr 19, 2022 · 3 comments · Fixed by #650 or #653
Labels
bug Something isn't working
Milestone

Comments

@kumattau
Copy link

Contour Terminal version

0.3.0.198

Installer source

GitHub: release page

Operating System

Ubuntu Linux 20.04

Architecture

x86-64

Other Software

No response

Steps to reproduce

Invalid option is specified. For example,

contour -V

Expected Behavior

Error message is shown without internal error.
At the same time, it is better to output how to display help or the help itself.

Actual Behavior

Error message is shown with internal error.

image

Additional notes

I noticed this when I tried to display the version with -V.
I think application should validate user's specified options and shows only appropriate message without internal error if the options are invalid.

This problem occurs in the current latest commit 0cf97cb

@kumattau kumattau added the bug Something isn't working label Apr 19, 2022
@christianparpart christianparpart added this to the 0.3.1 milestone Apr 19, 2022
@christianparpart christianparpart changed the title Unexpected internal error if specifying invalid option Unexpected internal error if specifying invalid command line option Apr 20, 2022
@christianparpart
Copy link
Member

@kumattau I just wanted to mention, the version can be taken via contour version and help via contour help. We do support longopt-style syntax, so one might want to write contour --version and contour --help, too. Short-opts are currently not supported. On purpose actually. But that may change. I'm not hard'ly opinionated here. :)

christianparpart added a commit that referenced this issue Apr 20, 2022
@kumattau
Copy link
Author

@christianparpart
Thank you for the usage.
My point was not about usage, but that internal errors should not be reported when options are incorrectly specified.
I tried 720303e but there does not appear to be a fix for this yet.
Of course, it depends on the application's error handling policy, so I respects the answer if current error handing is in accordance with the specification of this software.

image

@christianparpart
Copy link
Member

The error is to appear in the window. That part is right. But it should be a user targeted error message, and not an internal error. I was sure I fixed that and checked it locally. I will revisit (As soon as I am awake enough) :)

christianparpart added a commit that referenced this issue Apr 24, 2022
…ms when the reuqested shell cannot be spawned (#647).
Utkarsh-khambra pushed a commit to Utkarsh-khambra/contour that referenced this issue Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants