Merge pull request #1678 from kielgillard/ios-candidate

Fix the logging of Feedly errors.
This commit is contained in:
Brent Simmons
2020-01-21 19:10:52 -08:00
committed by GitHub
2 changed files with 7 additions and 4 deletions

View File

@@ -88,8 +88,10 @@ extension FeedlyDownloadArticlesOperation: FeedlyOperationDelegate {
func feedlyOperation(_ operation: FeedlyOperation, didFailWith error: Error) {
assert(Thread.isMainThread)
// TODO: fix error for below line "Error is not convertible to NSError"
//os_log(.debug, log: log, "%{public}@ failed with error: %{public}@.", operation, error as NSError)
// Having this log is useful for debugging missing required JSON keys in the response from Feedly, for example.
os_log(.debug, log: log, "%{public}@ failed with error: %{public}@.", String(describing: operation), error as NSError)
cancel()
}
}

View File

@@ -159,8 +159,9 @@ extension FeedlySyncAllOperation: FeedlyOperationDelegate {
func feedlyOperation(_ operation: FeedlyOperation, didFailWith error: Error) {
assert(Thread.isMainThread)
// TODO: fix error for below line "Error is not convertible to NSError"
//os_log(.debug, log: log, "%{public}@ failed with error: %{public}@.", operation, error as NSError)
// Having this log is useful for debugging missing required JSON keys in the response from Feedly, for example.
os_log(.debug, log: log, "%{public}@ failed with error: %{public}@.", String(describing: operation), error as NSError)
syncCompletionHandler?(.failure(error))
syncCompletionHandler = nil