WASM executor: add OutputExceedsBounds variant to Error (#13841)

* WASM executor: add `OutputExceedsBounds` variant to `Error`

Previously this was a `WasmError`, which is intended for runtime construction errors. However this
led to confusion as output-exceeds-bounds occurs due to execution of `validate_block`.

* Fix warning
This commit is contained in:
Marcin S
2023-04-07 12:35:41 +02:00
committed by GitHub
parent e77099c1a6
commit bfd43dbce5
3 changed files with 10 additions and 10 deletions
@@ -104,6 +104,9 @@ pub enum Error {
#[error("Execution aborted due to trap: {0}")]
AbortedDueToTrap(MessageWithBacktrace),
#[error("Output exceeds bounds of wasm memory")]
OutputExceedsBounds,
}
impl wasmi::HostError for Error {}
@@ -153,7 +156,7 @@ pub enum WasmError {
Instantiation(String),
/// Other error happenend.
#[error("{0}")]
#[error("Other error happened while constructing the runtime: {0}")]
Other(String),
}