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

evaluator: Tighten error handling with panics #68

Merged
merged 2 commits into from
Feb 9, 2023
Merged

evaluator: Tighten error handling with panics #68

merged 2 commits into from
Feb 9, 2023

Conversation

juliaogris
Copy link
Member

@juliaogris juliaogris commented Feb 8, 2023

Tighten error handling with panics rather than returning false or nil so
that we can track down errors more easily in when they are a result of
internal coding errors.

@juliaogris juliaogris requested a review from camh- February 8, 2023 01:39
@github-actions
Copy link

github-actions bot commented Feb 8, 2023

firebase-deployment: https://evy-lang--68-60kb6aej.web.app (045b695)

Panic with internal errors for Value.Set/Equals instead of silently
swallowing incorrect types to this methods. The initial plan of returning
errors seems to cumbersome for states that are evy internal errors
and _should_ probably halt an evy program in execution.

Unfortunately tinygo doesn't currently implement recover.
Tighten error handling and panic on unknown node type for Eval function,
previously we just returned nil which seemed to only take effect for
FuncDecls and inferred slice beginnings and end. Fix these up in the
place where they are expected.
Copy link
Contributor

@camh- camh- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍃 LGTM

@juliaogris juliaogris merged commit 3f6a521 into master Feb 9, 2023
@juliaogris juliaogris deleted the panic branch February 9, 2023 00:29
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.

None yet

2 participants