impl From<anyhow::Error> for Trap (#1753)

* From<anyhow::Error> for Trap

* Add TrapReason::Error

* wasmtime: Improve Error to Trap conversion

* Remove Trap::message
This commit is contained in:
Leonardo Yvens
2020-05-29 17:24:12 -03:00
committed by GitHub
parent 8fce8ddefc
commit 0b3b9c298e
11 changed files with 74 additions and 65 deletions

View File

@@ -32,7 +32,7 @@ fn main() -> Result<()> {
let trap = run().unwrap_err();
println!("trap received...");
assert!(trap.message().contains("wasm trap: interrupt"));
assert!(trap.to_string().contains("wasm trap: interrupt"));
Ok(())
}