2024-04-03 06:43:06 +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, Sendable {
|
|
|
|
|
2024-04-07 23:34:06 +02:00
|
|
|
public enum FeedParserErrorType: Sendable {
|
2024-04-03 06:43:06 +02:00
|
|
|
|
|
|
|
case rssChannelNotFound
|
|
|
|
case rssItemsNotFound
|
|
|
|
case jsonFeedVersionNotFound
|
|
|
|
case jsonFeedItemsNotFound
|
|
|
|
case jsonFeedTitleNotFound
|
|
|
|
case invalidJSON
|
|
|
|
}
|
|
|
|
|
|
|
|
public let errorType: FeedParserErrorType
|
|
|
|
|
|
|
|
public init(_ errorType: FeedParserErrorType) {
|
|
|
|
|
|
|
|
self.errorType = errorType
|
|
|
|
}
|
|
|
|
}
|