Skip to content
New issue

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

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

Already on GitHub? # to your account

Use error handling instead of unwrap to avoid panics #34

Closed
pothos opened this issue Nov 27, 2023 · 0 comments · Fixed by #39
Closed

Use error handling instead of unwrap to avoid panics #34

pothos opened this issue Nov 27, 2023 · 0 comments · Fixed by #39
Assignees
Labels
kind/bug Something isn't working

Comments

@pothos
Copy link
Member

pothos commented Nov 27, 2023

The use of .unwrap() in the core logic means that the app will crash on unexpected inputs.
Replace it with .ok_or(E)? or similar to return function errors.
This helps with writing tests and showing proper error messages in the CLI.

@pothos pothos added the kind/bug Something isn't working label Nov 27, 2023
@dongsupark dongsupark self-assigned this Nov 29, 2023
@dongsupark dongsupark changed the title No panics Use error handling instead of unwrap to avoid panics Nov 30, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants