Improve error handling abstractions in wasm-transform and wasm-chain-integration #203
Labels
good first issue
Good for newcomers
[Prio] Low
Should be fixed if time permits but can be postponed.
[Type] Task
An additional feature or improvement.
Task description
The interpreter and wasm-chain integration often use anyhow::Error as an error type. This is for historical reasons since during initial development this is most flexible. We then use
downcast
to identify whether specific errors, such as OutOfEnergy occurred. We also have a number of other concrete errors that I needed during testing. Still there are some remaining errors that are justbail!("arbitrary string")
.The ideal way of doing error handling is that each of the library methods (i.e., all of parsing, validation, interpreter) would return a precise error, which would be an enum. anyhow::Error should only be used in cargo-concordium at the application level.
This task is to get to this point.
Sub-tasks
This will make error handling more robust. In particular with the current setup checking whether execution failed with out of energy, or whether it failed for some other reason is not clean and transparent.
The text was updated successfully, but these errors were encountered: