SysBasic¶
Usage
use SysBasic;
or
import SysBasic;
Types for low-level system error integration.
This module defines the error types syserr
and qio_err_t
.
When should one use syserr
and when should one use qio_err_t
?
qio_err_t
is a system error code (a c_int by a nicer name to
indicate its purpose). syserr
is an enhanced error that might also
include an error message. All user-facing Chapel library code, or user
Chapel code, should generally use syserr
. When wrapping functions
or declaring them in C, use qio_err_t
to indicate that a function is
returning an error code.
A note about the error code documentation in this file. Error descriptions for system errors are included here for convenience only. Other documentation, such as system man pages or the POSIX specification are the authority on system error codes.
- type syserr¶
A type storing an error code or an error message. A syserr can be compared using == or != to an qio_err_t (ie integer error code) or to another syserr. A syserr can be cast to or from an qio_err_t. It can be assigned the value of an qio_err_t or another syserr. In addition, syserr can be checked directly in an if statement like so:
var err: syserr; if err then do writeln("err contains an error, ie err != ENOERR"); if !err then do writeln("err does not contain an error; err == ENOERR");
When a
syserr
formal has default intent, the actual is copied to the formal upon a function call and the formal cannot be assigned within the function.The default value of the
syserr
type is undefined.
- type qio_err_t = c_int¶
An integral error code. This is really just a c_int, but code is clearer if you use qio_err_t to indicate arguments, variables, and return types that are system error codes.
- type fd_t = c_int¶
A system file descriptor. This is really just a c_int, but code is clearer if you use fd_t to indicate arguments, variables, and return types that are system file descriptors.
- proc ENOERR¶
The error code indicating that no error occurred (Chapel specific)
- proc EEOF¶
An error code indicating the end of file has been reached (Chapel specific)
- proc ESHORT¶
An error code indicating that the end of file or the end of the input was reached before the requested amount of data could be read. (Chapel specific)
- proc EFORMAT¶
An error code indicating a format error; for example when reading a quoted string literal, this would be returned if we never encountered the opening quote. (Chapel specific)
- const EBADE: qio_err_t¶
Invalid exchange (linux only)
- const EBADFD: qio_err_t¶
File descriptor in bad state (linux only)
- const EBADR: qio_err_t¶
Invalid request descriptor (linux only)
- const EBADRQC: qio_err_t¶
Invalid request code (linux only)
- const EBADSLT: qio_err_t¶
Invalid slot (linux only)
- const ECHRNG: qio_err_t¶
Channel number out of range (linux only)
- const ECOMM: qio_err_t¶
Communication error on send (linux only)
- const EHOSTDOWN: qio_err_t¶
Host is down. A socket operation failed because the destination host was down. (linux, FreeBSD)
- const EISNAM: qio_err_t¶
Is a named type file (linux only)
- const EKEYEXPIRED: qio_err_t¶
Key has expired (linux only)
- const EKEYREJECTED: qio_err_t¶
Key was rejected by service (linux only)
- const EKEYREVOKED: qio_err_t¶
Key has been revoked (linux only)
- const EL2HLT: qio_err_t¶
Level 2 halted (linux only)
- const EL2NSYNC: qio_err_t¶
Level 2 not synchronized (linux only)
- const EL3HLT: qio_err_t¶
Level 3 halted (linux only)
- const EL3RST: qio_err_t¶
Level 3 halted (linux only)
- const ELIBACC: qio_err_t¶
Cannot access a needed shared library (linux only)
- const ELIBBAD: qio_err_t¶
Accessing a corrupted shared library (linux only)
- const ELIBMAX: qio_err_t¶
Attempting to link in too many shared libraries (linux only)
- const ELIBSCN: qio_err_t¶
lib section in a.out corrupted (linux only)
- const ELIBEXEC: qio_err_t¶
Cannot exec a shared library directly (linux only)
- const EMEDIUMTYPE: qio_err_t¶
Wrong medium type (linux only)
- const ENODATA: qio_err_t¶
No message is available on the STREAM head read queue (POSIX.1)
- const ENOKEY: qio_err_t¶
Required key not available (linux only)
- const ENOMEDIUM: qio_err_t¶
No medium found (linux only)
- const ENONET: qio_err_t¶
Machine is not on the network (linux only)
- const ENOPKG: qio_err_t¶
Package not installed (linux only)
- const ENOSR: qio_err_t¶
No STREAM resources (POSIX.1 XSI STREAMS option)
- const ENOSTR: qio_err_t¶
Not a STREAM (POSIX.1 XSI STREAMS option)
- const ENOTBLK: qio_err_t¶
Block device required. A block device operation was attempted on a non-block device or file. (linux, FreeBSD)
- const ENOTUNIQ: qio_err_t¶
Name not unique on network (linux only)
- const EPFNOSUPPORT: qio_err_t¶
Protocol family not supported. The protocol family has not been configured into the system or no implementation for it exists. (linux, FreeBSD)
- const EREMCHG: qio_err_t¶
Remote address changed (linux only)
- const EREMOTE: qio_err_t¶
Object is remote (linux only)
- const EREMOTEIO: qio_err_t¶
Remote I/O error (linux only)
- const ERESTART: qio_err_t¶
Interrupted system call should be restarted (linux only)
- const ESHUTDOWN: qio_err_t¶
Can’t send after socket shutdown. A request to send data was disallowed because the socket had already been shut down with a previous shutdown system call.
- const ESOCKTNOSUPPORT: qio_err_t¶
Socket type not supported. The support for the socket type has not been configured into the system or no implementation for it exists. (linux, FreeBSD)
- const ESTRPIPE: qio_err_t¶
Streams pipe error (linux only)
- const ETIME: qio_err_t¶
Timer expired (POSIX.1 XSI STREAMS option)
- const EUCLEAN: qio_err_t¶
Structure needs cleaning (linux only)
- const EUNATCH: qio_err_t¶
Protocol driver not attached (linux only)
- const EUSERS: qio_err_t¶
Too many users. The quota system ran out of table entries. (linux, FreeBSD)
- const EXFULL: qio_err_t¶
Exchange full (linux only)
- const E2BIG: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EACCES: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EADDRINUSE: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EADDRNOTAVAIL: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EAFNOSUPPORT: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EAGAIN: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EALREADY: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EBADF: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EBADMSG: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EBUSY: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ECANCELED: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ECHILD: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ECONNABORTED: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ECONNREFUSED: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ECONNRESET: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EDEADLK: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EDESTADDRREQ: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EDOM: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EDQUOT: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EEXIST: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EFAULT: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EFBIG: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EHOSTUNREACH: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EIDRM: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EILSEQ: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EINPROGRESS: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EINTR: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EINVAL: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EIO: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EISCONN: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EISDIR: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ELOOP: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EMFILE: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EMLINK: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EMSGSIZE: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EMULTIHOP: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ENAMETOOLONG: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ENETDOWN: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ENETRESET: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ENETUNREACH: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ENFILE: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ENOBUFS: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ENODEV: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ENOENT: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ENOEXEC: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ENOLCK: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ENOLINK: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ENOMEM: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ENOMSG: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ENOPROTOOPT: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ENOSPC: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ENOSYS: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ENOTCONN: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ENOTDIR: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ENOTEMPTY: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ENOTSOCK: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ENOTSUP: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ENOTTY: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ENXIO: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EOPNOTSUPP: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EOVERFLOW: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EPERM: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EPIPE: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EPROTO: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EPROTONOSUPPORT: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EPROTOTYPE: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ERANGE: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EROFS: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ESPIPE: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ESRCH: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ESTALE: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ETIMEDOUT: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const ETXTBSY: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EWOULDBLOCK: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead
- const EXDEV: qio_err_t¶
Warning
POSIX error codes defined in ‘SysBasic’ are deprecated; please use them from ‘OS.POSIX’ instead