Skip to content

Commit 31bf0d6

Browse files
committed
Merge pull request #168 from brownleej/not-implemented-context
Adds file and line context to more error functions.
2 parents d9817a4 + 0962bb7 commit 31bf0d6

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)