Macro sewup_derive::ewasm_rusty_err_output[][src]

ewasm_rusty_err_output!() { /* proc-macro */ }
Expand description

helps you assert return Err your handler with rusty ewasm_main, namely #[ewasm_main(rusty)]

This usage of the macro likes ewasm_err_output, the contract main function should be decorated with #[ewasm_main(rusty)].

You should pass the complete Result type, as the following example ewasm_rusty_err_output!(Err("NotTrustedInput") as Result<(), &'static str>) such that you can easy to use any kind of rust error as you like.