Remove unnecessary extractor specific errors

This commit is contained in:
Maurice Parker 2019-09-24 03:38:17 -05:00
parent 4e239a44e1
commit 3a8ec93644
1 changed files with 1 additions and 7 deletions

View File

@ -21,12 +21,6 @@ protocol ArticleExtractorDelegate {
func articleExtractionDidComplete(extractedArticle: ExtractedArticle)
}
enum ArticleExtractorError: Error {
case UnableToParseHTML
case MissingURL
case UnableToLoadURL
}
class ArticleExtractor {
private var dataTask: URLSessionDataTask? = nil
@ -75,7 +69,7 @@ class ArticleExtractor {
guard let data = data else {
self.state = .failedToParse
DispatchQueue.main.async {
self.delegate?.articleExtractionDidFail(with: ArticleExtractorError.UnableToLoadURL)
self.delegate?.articleExtractionDidFail(with: URLError(.cannotDecodeContentData))
}
return
}