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

Remove panics #1

Open
battesonb opened this issue May 10, 2023 · 0 comments
Open

Remove panics #1

battesonb opened this issue May 10, 2023 · 0 comments

Comments

@battesonb
Copy link
Collaborator

battesonb commented May 10, 2023

The parser should not panic but rather return a Result type indicating what failed. The client can opt to handle this more gracefully depending on the use-case. For example, printing an, "unknown token found while parsing," error.

EDIT: More ideal is replacing the panics with more robust type-modelling to avoid the catch-all in the match statements.

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