Simplify runtime api error handling (#8114)

* Ahh

* Work work work

* Fix all the compilation errors

* Fix test

* More fixes...
This commit is contained in:
Bastian Köcher
2021-02-15 12:55:40 +01:00
committed by GitHub
parent b5e692104c
commit 33f9becf41
48 changed files with 270 additions and 415 deletions
@@ -50,10 +50,7 @@ fn calling_wasm_runtime_function() {
}
#[test]
#[should_panic(
expected =
"Could not convert parameter `param` between node and runtime: DecodeFails always fails"
)]
#[should_panic(expected = "FailedToConvertParameter { function: \"fail_convert_parameter\"")]
fn calling_native_runtime_function_with_non_decodable_parameter() {
let client = TestClientBuilder::new().set_execution_strategy(ExecutionStrategy::NativeWhenPossible).build();
let runtime_api = client.runtime_api();
@@ -62,7 +59,7 @@ fn calling_native_runtime_function_with_non_decodable_parameter() {
}
#[test]
#[should_panic(expected = "Could not convert return value from runtime to node!")]
#[should_panic(expected = "FailedToConvertReturnValue { function: \"fail_convert_return_value\"")]
fn calling_native_runtime_function_with_non_decodable_return_value() {
let client = TestClientBuilder::new().set_execution_strategy(ExecutionStrategy::NativeWhenPossible).build();
let runtime_api = client.runtime_api();