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

Refactor to wrap invalid argument #1977

Merged

Conversation

shadowspawn
Copy link
Collaborator

Pull Request

This is an optional refactor.

Problem

The extra try/catch code to handle command.invalidArgument means calling option.parseArgs and argument.parseArgs is noisy.

Solution

I liked the refactoring in #1913 which wrapped exception and promise handling. Here it is just the exception handling, but still cleans up the calling code.

Copy link
Collaborator

@abetomo abetomo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@shadowspawn shadowspawn added the pending release Merged into a branch for a future release, but not released yet label Aug 24, 2023
@shadowspawn shadowspawn merged commit 4c095d1 into tj:develop Aug 24, 2023
11 checks passed
@shadowspawn shadowspawn deleted the feature/refactor-wrap-invalid-argument branch August 24, 2023 01:34
@shadowspawn shadowspawn removed the pending release Merged into a branch for a future release, but not released yet label Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants