Errno
An error number used by system calls to communicate what kind of error occurred.
- iOS
- 8+
@frozen struct ErrnoAn error number used by system calls to communicate what kind of error occurred.
@frozen struct Errnoimport SystemPackageprotocol BitwiseCopyable : ~Escapableprotocol CopyableA type whose values can be implicitly or explicitly copied.
protocol CustomDebugStringConvertibleA type with a customized textual representation suitable for debugging purposes.
protocol CustomStringConvertibleA type with a customized textual representation.
protocol DecodableA type that can decode itself from an external representation.
protocol EncodableA type that can encode itself to an external representation.
protocol EquatableA type that can be compared for value equality.
protocol Error : SendableA type representing an error value that can be thrown.
protocol Escapableprotocol Hashable : EquatableA type that can be hashed into a Hasher to produce an integer hash value.
protocol RawRepresentable<RawValue>A type that can be converted to and from an associated raw value.
protocol SendableA thread-safe type whose values can be shared across arbitrary concurrent contexts without introducing a risk of data races. Values of the type may have no shared mutable state, or they may protect that state with a lock or by forcing it to only be accessed from a specific actor.
init(rawValue: CInt) Creates a strongly typed error number from a raw C error number.
static var addressFamilyNotSupported: Errno { get }The address family isn’t supported by the protocol family.
static var addressInUse: Errno { get }Address already in use.
static var addressNotAvailable: Errno { get }Can’t assign the requested address.
static var addressRequired: Errno { get }Destination address required.
static var alreadyInProcess: Errno { get }Operation already in progress.
static var argListTooLong: Errno { get }The argument list is too long.
static var badAddress: Errno { get }Bad address.
static var badFileDescriptor: Errno { get }Bad file descriptor.
static var badMessage: Errno { get }Bad message.
static var brokenPipe: Errno { get }Broken pipe.
static var canceled: Errno { get }Operation canceled.
static var connectionAbort: Errno { get }Software caused a connection abort.
static var connectionRefused: Errno { get }Connection refused.
static var connectionReset: Errno { get }Connection reset by peer.
static var deadlock: Errno { get }Resource deadlock avoided.
static var directoryNotEmpty: Errno { get }Directory not empty.
static var diskQuotaExceeded: Errno { get }Disk quota exceeded.
static var execFormatError: Errno { get }Executable format error.
static var fileExists: Errno { get }File exists.
static var fileNameTooLong: Errno { get }The file name is too long.
static var fileTooLarge: Errno { get }The file is too large.
static var hostIsDown: Errno { get }The host is down.
static var identifierRemoved: Errno { get }Identifier removed.
static var illegalByteSequence: Errno { get }Illegal byte sequence.
static var illegalSeek: Errno { get }Illegal seek.
static var improperLink: Errno { get }Improper link.
static var inappropriateIOCTLForDevice: Errno { get }Inappropriate control function.
static var interrupted: Errno { get }Interrupted function call.
static var invalidArgument: Errno { get }Invalid argument.
static var ioError: Errno { get }Input/output error.
static var isDirectory: Errno { get }Is a directory.
static var messageTooLong: Errno { get }Message too long.
static var multiHop: Errno { get }Reserved.
static var networkDown: Errno { get }Network is down.
static var networkReset: Errno { get }Network dropped connection on reset.
static var networkUnreachable: Errno { get }Network is unreachable.
static var noBufferSpace: Errno { get }No buffer space available.
static var noChildProcess: Errno { get }No child processes.
static var noData: Errno { get }No message available.
static var noFunction: Errno { get }Function not implemented.
static var noLink: Errno { get }Reserved.
static var noLocks: Errno { get }No locks available.
static var noMemory: Errno { get }Can’t allocate memory.
static var noMessage: Errno { get }No message of desired type.
static var noRouteToHost: Errno { get }No route to host.
static var noSpace: Errno { get }Device out of space.
static var noStreamResources: Errno { get }Reserved.
static var noSuchAddressOrDevice: Errno { get }No such device or address.
static var noSuchFileOrDirectory: Errno { get }No such file or directory.
static var noSuchProcess: Errno { get }No such process.
static var notBlockDevice: Errno { get }Not a block device.
static var notDirectory: Errno { get }Not a directory.
static var notPermitted: Errno { get }Operation not permitted.
static var notRecoverable: Errno { get }State not recoverable.
static var notSocket: Errno { get }A socket operation was performed on something that isn’t a socket.
static var notStream: Errno { get }Reserved.
static var notSupported: Errno { get }Not supported.
static var notSupportedOnSocket: Errno { get }Operation not supported on socket.
static var nowInProgress: Errno { get }Operation now in progress.
static var operationNotSupportedByDevice: Errno { get }Operation not supported by device.
static var outOfDomain: Errno { get }Numerical argument out of domain.
static var outOfRange: Errno { get }Numerical result out of range.
static var overflow: Errno { get }Value too large to be stored in data type.
static var permissionDenied: Errno { get }Permission denied.
static var previousOwnerDied: Errno { get }Previous pthread mutex owner died.
static var protocolError: Errno { get }Protocol error.
static var protocolFamilyNotSupported: Errno { get }Protocol family not supported.
static var protocolNotAvailable: Errno { get }Protocol not available.
static var protocolNotSupported: Errno { get }Protocol not supported.
static var protocolWrongTypeForSocket: Errno { get }Protocol wrong for socket type.
static var readOnlyFileSystem: Errno { get }Read-only file system.
static var resourceBusy: Errno { get }Resource busy.
static var resourceTemporarilyUnavailable: Errno { get }Resource temporarily unavailable.
static var socketIsConnected: Errno { get }Socket is already connected.
static var socketNotConnected: Errno { get }Socket is not connected.
static var socketShutdown: Errno { get }Can’t send after socket shutdown.
static var socketTypeNotSupported: Errno { get }Socket type not supported.
static var staleNFSFileHandle: Errno { get }Stale NFS file handle.
static var textFileBusy: Errno { get }Text file busy.
static var timedOut: Errno { get }Operation timed out.
static var timeout: Errno { get }Reserved.
static var tooManyLinks: Errno { get }Too many links.
static var tooManyOpenFiles: Errno { get }This process has too many open files.
static var tooManyOpenFilesInSystem: Errno { get }The system has too many open files.
static var tooManyReferences: Errno { get }Too many references: can’t splice.
static var tooManyRemoteLevels: Errno { get }Too many levels of remote in path.
static var tooManySymbolicLinkLevels: Errno { get }Too many levels of symbolic links.
static var tooManyUsers: Errno { get }Too many users.
static var wouldBlock: Errno { get }Operation would block.
var _code: Int { get }var _domain: String { get }var debugDescription: String { get }A textual representation, suitable for debugging, of the most recent error returned by a system call.
var description: String { get }A textual representation of the most recent error returned by a system call.
let rawValue: CIntThe raw C error number.
static func ~= (lhs: Errno, rhs: any Error) -> Bool init(from decoder: any Decoder) throws Creates a new instance by decoding from the given decoder, when the type’s RawValue is Int32.
var hashValue: Int { get }static func != (lhs: Self, rhs: Self) -> Bool Returns a Boolean value indicating whether two values are not equal.
func encode(to encoder: any Encoder) throws Encodes this value into the given encoder, when the type’s RawValue is Int32.
func hash(into hasher: inout Hasher)