Improvement Error Handling
jpmartha opened this issue · comments
SharingFlowError
} catch let error as NSError {
completion?(sharingFlowResult: .Failure(self.imagePath, error))
https://github.com/JPMartha/EggsBenedict/blob/develop/EggsBenedict/SharingFlow.swift#L115-L116
And, I think it is not necessary to implement the following:
guard !self.imagePath.isEmpty else {
completion?(sharingFlowResult: .Failure(self.imagePath, SharingFlowError.ImagePathIsEmpty))
return
}
https://github.com/JPMartha/EggsBenedict/blob/develop/EggsBenedict/SharingFlow.swift#L125-L128