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

[Question] Is there a way to receive typed errors (not just strings with error messages)? #272

Open
curldivergence opened this issue Apr 15, 2023 · 0 comments

Comments

@curldivergence
Copy link

Hi! Thanks a lot for the amazing library, it's working really well for me :) But I have a question though - if I wanted to return an enum class with different types of syntax errors from the parser, what is the best way to achieve that? Right now I can only think of parsing the strings I receive in the logger callback to infer the type from them, but it feels very hacky to me :)
So is there any chance you could suggest a better approach?

Thank you!

@yhirose yhirose assigned yhirose and unassigned yhirose Apr 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants