Closed pchickey closed 1 year ago
The wasi-common::Error enum is actually specific to the filesystem. Table operations (which get used by other crates now) have only three error cases:
wasi-common::Error
This change makes it possible for these error cases to be translated to whatever error value or trap is appropriate at the use site.
In wasi-common filesystem, I provided the old translation - trap when full, badf otherwise.
In wasi-common streams, we trap when full, and return the empty stream error type otherwise. That type still needs fleshing out in the wit definition.
In wasi-sockets, we always trap, because the error cases there are also not fleshed out, and also trappable errors are broken in sockets (see #163 )
The
wasi-common::Error
enum is actually specific to the filesystem. Table operations (which get used by other crates now) have only three error cases:This change makes it possible for these error cases to be translated to whatever error value or trap is appropriate at the use site.
In wasi-common filesystem, I provided the old translation - trap when full, badf otherwise.
In wasi-common streams, we trap when full, and return the empty stream error type otherwise. That type still needs fleshing out in the wit definition.
In wasi-sockets, we always trap, because the error cases there are also not fleshed out, and also trappable errors are broken in sockets (see #163 )