2017-06-25 19:23:30 +02:00
|
|
|
//
|
|
|
|
// FeedParserError.swift
|
|
|
|
// RSParser
|
|
|
|
//
|
|
|
|
// Created by Brent Simmons on 6/24/17.
|
|
|
|
// Copyright © 2017 Ranchero Software, LLC. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
|
|
|
|
public struct FeedParserError: Error {
|
|
|
|
|
|
|
|
public enum FeedParserErrorType {
|
|
|
|
|
|
|
|
case rssChannelNotFound
|
|
|
|
case rssItemsNotFound
|
2017-06-25 20:48:44 +02:00
|
|
|
case jsonFeedVersionNotFound
|
|
|
|
case jsonFeedItemsNotFound
|
|
|
|
case jsonFeedTitleNotFound
|
2017-06-25 23:06:01 +02:00
|
|
|
case invalidJSON
|
2017-06-25 19:23:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public let errorType: FeedParserErrorType
|
|
|
|
|
|
|
|
public init(_ errorType: FeedParserErrorType) {
|
|
|
|
|
|
|
|
self.errorType = errorType
|
|
|
|
}
|
|
|
|
}
|