Skip to content

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

Open
@curldivergence

Description

@curldivergence

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!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions