CError
public struct CError: Swift.Error
CError is an error thrown by a C system call. It may be from
a typical -1 return code that sets errno, from a getaddrinfo call
or directly from an errno.
-
The error code.
Declaration
Swift
public let code: Int32 -
The error message as returned by
strerrororgai_strerror.Declaration
Swift
public let message: String -
Creates and throws the corresponding CError if the
codeis equal toerrorValue, otherwise is a no-op.Declaration
Swift
public static func makeAndThrow(fromReturnCode code: Int32, errorValue: Int32 = -1) throws -
Creates and throws the corresponding CError if
errnois not equal to 0, otherwise is a no-op.Declaration
Swift
public static func makeAndThrow(fromErrNo errno: Int32) throws -
Creates and throws the corresponding CError if
codeis not equal to 0, otherwise is a no-op.Declaration
Swift
public static func makeAndThrow(fromGAICode code: Int32) throws
-
The string description of the error.
Declaration
Swift
public var description: String
CError Struct Reference