-
Couldn't load subscription status.
- Fork 5
Fixes #216: Unwrap all Trace calls #232
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
|
This PR is no longer in-scope. Please see https://github.com/ripple/xrpl-wasm-std for now and feel free to re-open a PR like this one in that project, if appropriate (we may revisit a CLI in the future, but for now are continuing work on the XRPL WASM standard library in that project). |
Fixes #216 to ensure that any errors in
tracemethods unwrap and expose the error, by implementing the following:trace…methods panic on an error.trace_with_resultvariants 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_resultvariants should be used instead.