Respond to CR.

pull/1/head
Matthew Chen 7 years ago
parent 11eaf1474e
commit d01023d862

@ -29,12 +29,12 @@ public func AssertIsOnMainThread(file: String = #file,
// Once we're on Swift4.2 we can mark this as inlineable // Once we're on Swift4.2 we can mark this as inlineable
// @inlinable // @inlinable
public func owsFail(_ rawMessage: String, public func owsFail(_ logMessage: String,
file: String = #file, file: String = #file,
function: String = #function, function: String = #function,
line: Int = #line) { line: Int = #line) {
// TODO: Format using owsFormatLogMessage() once it is merged. // TODO: Format using owsFormatLogMessage() once it is merged.
let message = "\(file) \(function) \(line): \(rawMessage)" let message = "\(file) \(function) \(line): \(logMessage)"
Logger.error(message) Logger.error(message)
Logger.flush() Logger.flush()
assertionFailure(message) assertionFailure(message)
@ -42,11 +42,11 @@ public func owsFail(_ rawMessage: String,
// Once we're on Swift4.2 we can mark this as inlineable // Once we're on Swift4.2 we can mark this as inlineable
// @inlinable // @inlinable
public func owsProdExit(_ rawMessage: String, public func owsProdExit(_ logMessage: String,
file: String = #file, file: String = #file,
function: String = #function, function: String = #function,
line: Int = #line) { line: Int = #line) {
owsFail(rawMessage, file: file, function: function, line: line) owsFail(logMessage, file: file, function: function, line: line)
fatalError() fatalError(logMessage)
} }

Loading…
Cancel
Save