diff --git a/Sources/Socket/System/SocketHelpers.swift b/Sources/Socket/System/SocketHelpers.swift index f0e9ab2..50bba34 100644 --- a/Sources/Socket/System/SocketHelpers.swift +++ b/Sources/Socket/System/SocketHelpers.swift @@ -18,7 +18,7 @@ extension SocketDescriptor { /// If `body` throws an error /// or an error occurs while closing the file descriptor, /// this method rethrows that error. - public func closeAfter(_ body: () throws -> R) throws -> R { + public func closeAfter(_ body: () throws(Errno) -> R) throws(Errno) -> R { // No underscore helper, since the closure's throw isn't necessarily typed. let result: R do { @@ -42,7 +42,7 @@ extension SocketDescriptor { /// If `body` throws an error /// this method rethrows that error. @_alwaysEmitIntoClient - public func closeIfThrows(_ body: () throws -> R) throws -> R { + public func closeIfThrows(_ body: () throws(Errno) -> R) throws(Errno) -> R { do { return try body() } catch {