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

Avoiding swallowing errors that arise in exported functions #674

Conversation

saulecabrera
Copy link
Member

@saulecabrera saulecabrera commented Jun 21, 2024

Description of the change

Similar to the main (_start) case, eval_with_options returns a promise, which, needs to be explicitly inspected in order to retrieve any values or any unhandled errors.

This commit ensures that the behaviour is the right one by inspecting the underlying promise.

Checklist

  • I've updated the relevant CHANGELOG files if necessary. Changes to javy-cli and javy-core do not require updating CHANGELOG files.
  • I've updated the relevant crate versions if necessary. Versioning policy for library crates
  • I've updated documentation including crate documentation if necessary.

Similar to the main (`_start`) case, `eval_with_options` returns
a promise, which, needs to be explicitly inspected in order to retrieve
any values or any unhandled errors.

This commit ensures that the behaviour is the right one by inspecting
the underlying promise.
@saulecabrera saulecabrera merged commit ef05dbd into bytecodealliance:main Jun 21, 2024
14 checks passed
@saulecabrera saulecabrera deleted the fix-error-handling-in-named-exports branch June 21, 2024 19:01
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