Crate posix_errors
source · [−]Expand description
Posix error codes and handy functions for using them.
Error codes taken from http://fxr.watson.org/fxr/source/sys/errno.h
Structs
Struct containing a posix error code and an error message
Constants
Argument list too long
Permission denied
Address already in use
Can’t assign requested address
Address family not supported by protocol family
Resource temporarily unavailable
Operation already in progress
Authentication error
Bad file descriptor
Bad message
RPC struct is bad
Device busy
Operation canceled
Not permitted in capability mode
No child processes
Software caused connection abort
Connection refused
Connection reset by peer
Terminated by CTRL-C
Resource deadlock avoided
Destination address required
Numerical argument out of domain
Programming error
Disc quota exceeded
File exists
Bad address
File too large
Inappropriate file type or format
Host is down
No route to host
Identifier removed
Illegal byte sequence
Operation now in progress
Interrupted system call
Invalid argument
Invalid argument to exit
Input/output error
Socket is already connected
Is a directory
Must be equal largest errno
Too many levels of symbolic links
Too many open files
Too many links
Message too long
Multihop attempted
File name too long
Need authenticator
Network is down
Network dropped connection on reset
Network is unreachable
Too many open files in system
Attribute not found
No buffer space available
Command not found
Operation not supported by device
No such file or directory
Exec format error
No locks available
Link has been severed
Cannot allocate memory
No message of desired type
Protocol not available
No space left on device
Function not implemented
Block device required
Capabilities insufficient
Socket is not connected
Not a directory
Directory not empty
Bash error codes
State not recoverable
Socket operation on non-socket
Operation not supported
Inappropriate ioctl for device
Device not configured
Operation not supported
Value too large to be stored in data type
Previous owner died
Operation not permitted
Protocol family not supported
Broken pipe
Too many processes
Bad procedure for program
Program version wrong
RPC prog. not avail
Protocol error
Protocol not supported
Protocol wrong type for socket
Result too large
Too many levels of remote in path
Read-only filesystem
RPC version wrong
Can’t send after socket shutdown
Socket type not supported
Illegal seek
No such process
Stale NFS file handle
Operation timed out
Too many references: can’t splice
Text file busy
Too many users
My custom errors
Resource temporarily unavailable
Cross-device link
Functions
Return a PosixError
from a failed std::process::Output
Create new PosixError
Convert std::io::Error
to a PosixError