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

Errors #380

Merged
merged 6 commits into from
Mar 22, 2024
Merged

Errors #380

merged 6 commits into from
Mar 22, 2024

Conversation

MichalMarsalek
Copy link
Collaborator

Closes #259
There are now three main types of errors:

  1. InvariantError Ideally, these should never occur, they mean that an invariant that should hold, doesn't. A bug that needs fixing.
  2. NotImplementedError This is typically thrown in emitters to signal that the IR could not be emitted to the target lang. This is part of the normal compilation workflow a different variant might be chosen instead. When a certain Polygolf feature is not covered, the result of a compilation is this error.
  3. UserError An error caused by the Polygolf user - parse errors, var reference errors, typecheck errors, deprecated feature errors, etc.

@MichalMarsalek MichalMarsalek marked this pull request as ready for review March 20, 2024 13:47
@MichalMarsalek MichalMarsalek merged commit 9b09c6f into main Mar 22, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

Consistently distinquish user error and unexpected internal error
2 participants