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

runtime-sdk: not-module-specific error type desired #846

Open
pro-wh opened this issue Mar 15, 2022 · 0 comments
Open

runtime-sdk: not-module-specific error type desired #846

pro-wh opened this issue Mar 15, 2022 · 0 comments
Labels
c:runtime-sdk Category: Runtime SDK enhancement New feature or request

Comments

@pro-wh
Copy link
Contributor

pro-wh commented Mar 15, 2022

imported from a discussion on slack:

  • more and more formerly centralized services done in the dispatcher are now becoming module-controlled
  • we used to have these processes use modules::core::Error as their error type
  • when we expanded stuff out to modules, we kept that error type as is
  • modules do whatever, and we ended up adding a bunch of wrappers in modules::core::Error to handle whatever other complaints come from modules
  • to break out of this practice of making more and more wrappers in modules::core::Error, we'd need a more general error type
  • RuntimeError (the module-code-message tuple from the oasis-core side) is general enough, but lacks the abort-ness information
  • module::CallResult can retain abort-ness information, but it's coupled into a Result-like enum, and it's hardcoded to have a cbor::Value payload on the Ok branch
  • I guess Box would be fine, but eh, extra allocations
@pro-wh pro-wh added enhancement New feature or request c:runtime-sdk Category: Runtime SDK labels Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c:runtime-sdk Category: Runtime SDK enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant