-
Notifications
You must be signed in to change notification settings - Fork 3
Fixes #216: Unwrap all Trace calls #232
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm concerned that the proliferation of these types of host functions will mean that the WASM code that is generated is much more bloated than it needs to be.
I think you meant to say, "helper functions" instead of "host functions"? If so, it's a fair point and I think I have three thoughts to help alleviate any worry:
|
# Conflicts: # projects/e2e-tests/host_functions_test/src/lib.rs # xrpl-wasm-std/src/host/host_bindings_for_testing.rs # xrpl-wasm-std/src/host/trace.rs
Fixes #216 to ensure that any errors in
trace
methods unwrap and expose the error, by implementing the following:trace…
methods panic on an error.trace_with_result
variants for callers that want to handle their own error.Type of Change
Release Note
All
trace...
calls will now panic if any error is encountered. Because this should never occur, this is not considered a breaking change. If a developer wants to called a trace function and handle the error manually, thetrace...with_result
variants should be used instead.