Skip to content

Commit 9cc5d4c

Browse files
authored
Align fatalError messages in Objective-C bridging methods for consistency (#5123)
* Updated fatalError message in DateComponents bridging method to reflect correct type information. * Aligned fatalError message in Notification bridging method with the format used in other bridging methods.
1 parent 974106b commit 9cc5d4c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/Foundation/DateComponents.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ extension DateComponents : _ObjectiveCBridgeable {
3838

3939
public static func _forceBridgeFromObjectiveC(_ dateComponents: NSDateComponents, result: inout DateComponents?) {
4040
if !_conditionallyBridgeFromObjectiveC(dateComponents, result: &result) {
41-
fatalError("Unable to bridge \(DateComponents.self) to \(self)")
41+
fatalError("Unable to bridge \(NSDateComponents.self) to \(self)")
4242
}
4343
}
4444

Sources/Foundation/Notification.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ extension Notification : _ObjectiveCBridgeable {
111111

112112
public static func _forceBridgeFromObjectiveC(_ x: NSNotification, result: inout Notification?) {
113113
if !_conditionallyBridgeFromObjectiveC(x, result: &result) {
114-
fatalError("Unable to bridge type")
114+
fatalError("Unable to bridge \(NSNotification.self) to \(self)")
115115
}
116116
}
117117

0 commit comments

Comments
 (0)