Skip to content

Commit

Permalink
Split error and compltion message.
Browse files Browse the repository at this point in the history
  • Loading branch information
tonystone committed May 23, 2018
1 parent 2d5c627 commit a1c142c
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions Sources/Connect/Internal/Queues/ActionContianer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,7 @@ internal class ActionContainer: Operation, ActionProxy {
defer {
self.state = .finished

logInfo(Log.tag) {
var message = "Proxy \(self) \(self.completionStatus)"

if self.completionStatus == .failed, let error = self.error {
message.append( " with error: \(error).")
} else {
message.append( ", execution statistics: \(self.statistics)")
}
return message
}
logInfo(Log.tag) { "Proxy \(self) \(self.completionStatus), execution statistics: \(self.statistics)" }

self.completion?(self)
}
Expand Down Expand Up @@ -115,6 +106,8 @@ internal class ActionContainer: Operation, ActionProxy {
if completionStatus != .canceled {
completionStatus = .failed
}

logError(Log.tag) { "Action \(self.action) threw error: \(error)." }
}
}

Expand Down

0 comments on commit a1c142c

Please sign in to comment.