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

Graceful handling of wrong user input #2

Open
flavio opened this issue Mar 13, 2023 · 0 comments
Open

Graceful handling of wrong user input #2

flavio opened this issue Mar 13, 2023 · 0 comments

Comments

@flavio
Copy link
Collaborator

flavio commented Mar 13, 2023

This is kinda related with #1, right now the code converts the limit value provided by the user to a Quantity object.
The conversion is done by using the MustParse function, which panics when the user input is wrong.

The code should instead use the ParseQuantity function which returns an error. The code should handle errors and tell the user which input provided was not valid. This allows easier remediation of wrong input by the user.

@wrkode wrkode mentioned this issue Mar 24, 2023
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

No branches or pull requests

1 participant