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

recover panic to promise #290

Merged
merged 1 commit into from
Mar 30, 2023
Merged

recover panic to promise #290

merged 1 commit into from
Mar 30, 2023

Conversation

ichiban
Copy link
Owner

@ichiban ichiban commented Mar 25, 2023

An alternative solution for #288

While #288 makes an interpreter transparent to panics, this PR makes it eagerly convert panics to Prolog exceptions.

@codecov
Copy link

codecov bot commented Mar 25, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (207281f) 99.11% compared to head (afba508) 99.11%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #290   +/-   ##
=======================================
  Coverage   99.11%   99.11%           
=======================================
  Files          23       23           
  Lines        7201     7211   +10     
=======================================
+ Hits         7137     7147   +10     
  Misses         59       59           
  Partials        5        5           
Impacted Files Coverage Δ
engine/builtin.go 99.52% <100.00%> (+<0.01%) ⬆️
engine/promise.go 100.00% <100.00%> (ø)
engine/vm.go 94.46% <100.00%> (+0.04%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@guregu
Copy link
Contributor

guregu commented Mar 28, 2023

Good idea IMO. I used a similar approach in trealla-js.

@ichiban ichiban marked this pull request as ready for review March 30, 2023 01:09
@ichiban ichiban merged commit 1864911 into main Mar 30, 2023
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.

2 participants