Skip to content

Commit

Permalink
errorDescription for Error.nonUniqueElements
Browse files Browse the repository at this point in the history
  • Loading branch information
frazer-rbsn committed Sep 18, 2024
1 parent a49adc4 commit 17a77de
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Sources/OrderedSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,13 @@ extension OrderedSet: Codable where Element: Codable {
extension OrderedSet {
enum Error : LocalizedError {
case nonUniqueElements

var errorDescription: String? {
switch self {
case .nonUniqueElements:
return "Attempted to decode an array into an OrderedSet, but found non-unique elements in the collection."
}
}
}
}

Expand Down

0 comments on commit 17a77de

Please sign in to comment.