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:
@@ -113,10 +113,10 @@ mod tests {
|
||||
.unwrap_err()
|
||||
.downcast::<Trap>()?;
|
||||
assert!(
|
||||
trap.message()
|
||||
.starts_with("wasm trap: out of bounds memory access"),
|
||||
trap.to_string()
|
||||
.contains("wasm trap: out of bounds memory access"),
|
||||
"bad trap message: {:?}",
|
||||
trap.message()
|
||||
trap.to_string()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -140,8 +140,8 @@ mod tests {
|
||||
.unwrap_err()
|
||||
.downcast::<Trap>()?;
|
||||
assert!(trap
|
||||
.message()
|
||||
.starts_with("wasm trap: out of bounds memory access"));
|
||||
.to_string()
|
||||
.contains("wasm trap: out of bounds memory access"));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user