package sys
import "github.com/tetratelabs/wazero/experimental/sys"
Index ¶
Types ¶
type Errno ¶
type Errno uint16
Errno is a subset of POSIX errno used by wazero interfaces. Zero is not an error. Other values should not be interpreted numerically, rather by constants prefixed with 'E'.
See https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html
const ( EACCES Errno = iota + 1 EAGAIN EBADF EEXIST EFAULT EINTR EINVAL EIO EISDIR ELOOP ENAMETOOLONG ENOENT ENOSYS ENOTDIR ENOTEMPTY ENOTSOCK ENOTSUP EPERM EROFS )
This is a subset of errors to reduce implementation burden. `wasip1` defines almost all POSIX error numbers, but not all are used in practice. wazero will add ones needed in POSIX order, as needed by functions that explicitly document returning them.
https://github.com/WebAssembly/WASI/blob/snapshot-01/phases/snapshot/docs.md#-errno-enumu16
func UnwrapOSError ¶
UnwrapOSError returns an Errno or zero if the input is nil.
func (Errno) Error ¶
Error implements error
func (Errno) Unwrap ¶
Unwrap is a convenience for runtime.GOOS which define syscall.Errno.
Source Files ¶
errno.go error.go syscall_errno.go syscall_errno_notwindows.go
- Version
- v1.3.1
- Published
- Jul 22, 2023
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 12 seconds ago –
Tools for package owners.