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

Error handling #33

Closed
m-s- opened this issue Aug 18, 2021 · 2 comments
Closed

Error handling #33

m-s- opened this issue Aug 18, 2021 · 2 comments
Assignees
Labels

Comments

@m-s-
Copy link
Collaborator

m-s- commented Aug 18, 2021

Currently, for all commands the only way of exiting with a non-zero exit code is by throwing an exception, which polutes the logs quite a bit. In dotnet/command-line-api, it should be possible for the handler to provide the exit code, but our handlers return void. This should possibly be refactored.
Also, there is no reason for our handlers to be public, though this has been a convention since the beginning.

@m-s- m-s- added the refactor label Aug 18, 2021
@m-s-
Copy link
Collaborator Author

m-s- commented Nov 25, 2021

We're currently taking advantage of the public modifier in the handlers for the unit tests, as well as the the ExecuteCommand builder action.

@m-s-
Copy link
Collaborator Author

m-s- commented Jan 3, 2023

This is ongoing

@m-s- m-s- assigned m-s- and joaoopereira and unassigned m-s- Jan 3, 2023
joaoopereira added a commit to joaoopereira/cli that referenced this issue Jan 3, 2023
replace all log error with throw CliException
@joaoopereira joaoopereira linked a pull request Jan 3, 2023 that will close this issue
@joaoopereira joaoopereira removed a link to a pull request Jan 3, 2023
joaoopereira added a commit to joaoopereira/cli that referenced this issue Jan 3, 2023
replace all log error with throw CliException
joaoopereira added a commit to joaoopereira/cli that referenced this issue Jan 3, 2023
replace all log error with throw CliException
joaoopereira added a commit to joaoopereira/cli that referenced this issue Jan 4, 2023
replace all log error with throw CliException
m-s- pushed a commit that referenced this issue Jan 4, 2023
replace all log error with throw CliException
@m-s- m-s- closed this as completed Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants