-
Notifications
You must be signed in to change notification settings - Fork 824
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
RuntimeError is not always downcastable to the host error #1328
Comments
Thanks for the bug report! I believe It seems that when an internal Additionally since, 0.14.0 it looks like we sometimes return an |
Will try to reproduce |
1401: Make runtime and trap errors well defined r=syrusakbary a=MarkMcCaskey Resolves #1328 This PR goes through and gives explicit types for all the errors instead of using `Box<dyn Any + Send>` where possible. This gives users better insight into what the specific errors are and should help with debugging in the case of mistakes in our code. The remaining uses of `Box<dyn Any>` are due to the structure of our dependency graph -- this is probably solvable but it seems fine as is as all error types are now explicit and the remaining `Box<dyn Any>`s are either fully user controlled or not for end-user consumption. # Review - [x] Add a short description of the the change to the CHANGELOG.md file Co-authored-by: Mark McCaskey <[email protected]>
Describe the bug
In Rust, sometimes
wasmer_runtime::error::RuntimeError
returned by Wasmer is not downcast-able to the error type that our host function returns to Wasmer.https://github.com/nearprotocol/nearcore/blob/a08944db6672185618e2454fce5e7be0e327b47a/runtime/near-vm-runner/src/errors.rs#L59
VMLogicError
https://github.com/nearprotocol/nearcore/blob/05a82d8dd74531b21567623ab0e7e75946afea19/runtime/near-vm-runner/src/imports.rs#L7Versions:
Expected behavior
RuntimeError
to be always downcastable to the error returned by the host functions.Actual behavior
Sometimes we are getting error that cannot be downcasted.
The text was updated successfully, but these errors were encountered: