Use wiggle "trappable error" to implement wasi-common (#5279)
* convert wasi-common from defining its own error to using wiggle trappable error * wasi-common impl crates: switch error strategy * wasmtime-wasi: error is trappable, and no longer requires UserErrorConversion * docs * typo * readdir: windows fixes * fix windows scheduler errors fun fact! the Send and Recv errors here that just had a `.context` on them were previously not being captured in the downcasting either. They need to be traps, and would have ended up that way by ommission, but you'd never actually know that by reading the code!
This commit is contained in:
@@ -33,7 +33,7 @@ impl Table {
|
||||
// NOTE: The performance of this new key calculation could be very bad once keys wrap
|
||||
// around.
|
||||
if self.map.len() == u32::MAX as usize {
|
||||
return Err(Error::trap("table has no free keys"));
|
||||
return Err(Error::trap(anyhow::Error::msg("table has no free keys")));
|
||||
}
|
||||
loop {
|
||||
let key = self.next_key;
|
||||
|
||||
Reference in New Issue
Block a user