Skip to content

Commit 0962bb7

Browse files
author
John Brownlee
committed
Adds file and line contexts to more error functions.
1 parent d9817a4 commit 0962bb7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Foundation/NSObjCRuntime.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,16 @@ public typealias NSComparator = (AnyObject, AnyObject) -> NSComparisonResult
7272

7373
public let NSNotFound: Int = Int.max
7474

75-
@noreturn internal func NSRequiresConcreteImplementation(fn: String = __FUNCTION__) {
76-
fatalError("\(fn) must be overriden in subclass implementations")
75+
@noreturn internal func NSRequiresConcreteImplementation(fn: String = __FUNCTION__, file: StaticString = __FILE__, line: UInt = __LINE__) {
76+
fatalError("\(fn) must be overriden in subclass implementations", file: file, line: line)
7777
}
7878

79-
@noreturn internal func NSUnimplemented(fn: String = __FUNCTION__) {
80-
fatalError("\(fn) is not yet implemented")
79+
@noreturn internal func NSUnimplemented(fn: String = __FUNCTION__, file: StaticString = __FILE__, line: UInt = __LINE__) {
80+
fatalError("\(fn) is not yet implemented", file: file, line: line)
8181
}
8282

83-
@noreturn internal func NSInvalidArgument(message: String, method: String = __FUNCTION__) {
84-
fatalError("\(method): \(message)")
83+
@noreturn internal func NSInvalidArgument(message: String, method: String = __FUNCTION__, file: StaticString = __FILE__, line: UInt = __LINE__) {
84+
fatalError("\(method): \(message)", file: file, line: line)
8585
}
8686

8787
internal struct _CFInfo {

0 commit comments

Comments
 (0)