Skip to content

Commit 5cdf073

Browse files
Merge pull request #57 from readium/develop
1.0.10
2 parents 4152a81 + 3034f16 commit 5cdf073

File tree

5 files changed

+6
-52
lines changed

5 files changed

+6
-52
lines changed

opds/Cartfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
github "readium/r2-shared-swift" == 1.2.11
1+
github "readium/r2-shared-swift" == 1.2.13
22
github "edrlab/Fuzi" == 2.2.2

opds/Cartfile.resolved

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
github "edrlab/Fuzi" "2.2.2"
2-
github "readium/r2-shared-swift" "1.2.11"
2+
github "readium/r2-shared-swift" "1.2.13"

opds/readium-opds/OPDS1Parser.swift

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,17 @@ import Fuzi
1313
import R2Shared
1414

1515
public enum OPDS1ParserError: Error {
16+
// The title is missing from the feed.
1617
case missingTitle
18+
// Root is not found
1719
case rootNotFound
18-
19-
var localizedDescription: String {
20-
switch self {
21-
case .missingTitle:
22-
return "The title is missing from the feed."
23-
case .rootNotFound:
24-
return "Root is not found"
25-
}
26-
}
2720
}
2821

2922
public enum OPDSParserOpenSearchHelperError: Error {
23+
// Search link not found in feed
3024
case searchLinkNotFound
25+
// OpenSearch document is invalid
3126
case searchDocumentIsInvalid
32-
33-
var localizedDescription: String {
34-
switch self {
35-
case .searchLinkNotFound:
36-
return "Search link not found in feed"
37-
case .searchDocumentIsInvalid:
38-
return "OpenSearch document is invalid"
39-
}
40-
}
4127
}
4228

4329
struct MimeTypeParameters {

opds/readium-opds/OPDS2Parser.swift

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,6 @@ public enum OPDS2ParserError: Error {
2222
case invalidGroup
2323
case invalidPublication
2424
case invalidNavigation
25-
26-
var localizedDescription: String {
27-
switch self {
28-
case .invalidJSON:
29-
return "OPDS 2 manifest is not valid JSON"
30-
case .metadataNotFound:
31-
return "Metadata not found"
32-
case .missingTitle:
33-
return "Missing title"
34-
case .invalidLink:
35-
return "Invalid link"
36-
case .invalidFacet:
37-
return "Invalid facet"
38-
case .invalidGroup:
39-
return "Invalid group"
40-
case .invalidPublication:
41-
return "Invalid publication"
42-
case .invalidNavigation:
43-
return "Invalid navigation"
44-
}
45-
}
4625
}
4726

4827
public class OPDS2Parser: Loggable {

opds/readium-opds/OPDSParser.swift

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,8 @@ import Foundation
1313
import R2Shared
1414

1515
public enum OPDSParserError: Error {
16-
1716
case documentNotFound
1817
case documentNotValid
19-
20-
var localizedDescription: String {
21-
switch self {
22-
case .documentNotFound:
23-
return "Document is not found"
24-
case .documentNotValid:
25-
return "Document is not valid"
26-
}
27-
}
28-
2918
}
3019

3120
public class OPDSParser {

0 commit comments

Comments
 (0)