Skip to content

Commit d3f077e

Browse files
committed
[SE-0112] Teach POSIXError to store the underlying NSError.
The error code is now specified by POSIXErrorCode.
1 parent 9b6e39e commit d3f077e

File tree

2 files changed

+487
-5
lines changed

2 files changed

+487
-5
lines changed

stdlib/public/Platform/POSIXError.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// FIXME: Only defining _POSIXError for Darwin at the moment.
1+
// FIXME: Only defining POSIXErrorCode for Darwin at the moment.
22

33
#if os(OSX) || os(iOS) || os(tvOS) || os(watchOS)
44
/// Enumeration describing POSIX error codes.
5-
@objc public enum POSIXError : Int32 {
5+
@objc public enum POSIXErrorCode : Int32 {
66
// FIXME: These are the values for Darwin. We need to get the Linux
77
// values as well.
88
/// Operation not permitted.
@@ -81,7 +81,7 @@
8181
/// Resource temporarily unavailable.
8282
case EAGAIN = 35
8383
/// Operation would block.
84-
public static var EWOULDBLOCK: POSIXError { return EAGAIN }
84+
public static var EWOULDBLOCK: POSIXErrorCode { return EAGAIN }
8585
/// Operation now in progress.
8686
case EINPROGRESS = 36
8787
/// Operation already in progress.
@@ -246,7 +246,7 @@
246246
/// Interface output queue is full.
247247
case EQFULL = 106
248248
/// Must be equal largest errno.
249-
public static var ELAST: POSIXError { return EQFULL }
249+
public static var ELAST: POSIXErrorCode { return EQFULL }
250250

251251
// FIXME: EOPNOTSUPP has different values depending on __DARWIN_UNIX03 and
252252
// KERNEL.

0 commit comments

Comments
 (0)