Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2026: expose trap error from RuntimeError r=syrusakbary a=ailisp <!-- Prior to submitting a PR, review the CONTRIBUTING.md document for recommendations on how to test: https://github.com/wasmerio/wasmer/blob/master/CONTRIBUTING.md#pull-requests --> # Description <!-- Provide details regarding the change including motivation, links to related issues, and the context of the PR. --> Internal of RuntimeError is private, user can know UserError via `downcast`, but user isn't able to tell the trap code if it's a `Trap`. This PR expose trap code via `RuntimeError#to_trap`. (And, if both downcast returns error and to_trap returns None, user will know it's a `RuntimeError::Generic`, which can be shown by `error.message()`, so there's no need to expose `RuntimeError::Generic` case) # Review - [] Add a short description of the the change to the CHANGELOG.md file Co-authored-by: Bo Yao <[email protected]>
- Loading branch information