@@ -344,14 +344,6 @@ public func _swift_Foundation_getErrorDefaultUserInfo(_ error: Error) -> Any? {
344
344
// NSError and CFError conform to the standard Error protocol. Compiler
345
345
// magic allows this to be done as a "toll-free" conversion when an NSError
346
346
// or CFError is used as an Error existential.
347
-
348
- extension NSError {
349
- /// The "embedded" NSError is itself.
350
- public func _getEmbeddedNSError( ) -> AnyObject ? {
351
- return self
352
- }
353
- }
354
-
355
347
extension CFError : Error {
356
348
public var _domain : String {
357
349
return CFErrorGetDomain ( self ) . _swiftObject
@@ -364,17 +356,6 @@ extension CFError : Error {
364
356
public var _userInfo : Any ? {
365
357
return CFErrorCopyUserInfo ( self ) as Any
366
358
}
367
-
368
- /// The "embedded" NSError is itself.
369
- public func _getEmbeddedNSError( ) -> AnyObject ? {
370
- return self
371
- }
372
- }
373
-
374
- // An error value to use when an Objective-C API indicates error
375
- // but produces a nil error object.
376
- public enum _GenericObjCError : Error {
377
- case nilError
378
359
}
379
360
380
361
/// An internal protocol to represent Swift error enums that map to standard
@@ -526,9 +507,6 @@ public extension _BridgedStoredNSError {
526
507
527
508
/// Implementation of CustomNSError for all _BridgedStoredNSErrors.
528
509
public extension _BridgedStoredNSError {
529
- // FIXME: Would prefer to have a clear "extract an NSError
530
- // directly" operation.
531
-
532
510
static var errorDomain : String { return _nsErrorDomain }
533
511
534
512
var errorCode : Int { return _nsError. code }
@@ -566,11 +544,6 @@ extension _ErrorCodeProtocol where Self._ErrorType: _BridgedStoredNSError {
566
544
}
567
545
568
546
extension _BridgedStoredNSError {
569
- /// Retrieve the embedded NSError from a bridged, stored NSError.
570
- public func _getEmbeddedNSError( ) -> AnyObject ? {
571
- return _nsError
572
- }
573
-
574
547
public static func == ( lhs: Self , rhs: Self ) -> Bool {
575
548
return lhs. _nsError. isEqual ( rhs. _nsError)
576
549
}
0 commit comments