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

What to do with fail and warn? #32

Open
erlend-aasland opened this issue Dec 21, 2023 · 0 comments
Open

What to do with fail and warn? #32

erlend-aasland opened this issue Dec 21, 2023 · 0 comments

Comments

@erlend-aasland
Copy link

fail and warn are painful, because they access the global clinic object (in order to fetch the current line number). We should really try to simplify this. A more pythonic way would IMO to just use exceptions. We could add a basal set of exceptions (parse errors, programming errors, converter error, etc.), and use these instead. For parse errors, we could catch these in the parser state machine, add the line number, and re-raise.

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