IME // Allow throwing Strings as Errors.
This commit is contained in:
parent
d6c1f0bd03
commit
69dfcf3064
|
@ -327,3 +327,9 @@ extension RangeReplaceableCollection where Element: Hashable {
|
|||
return filter { set.insert($0).inserted }
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Error Extension
|
||||
extension String: Error {}
|
||||
extension String: LocalizedError {
|
||||
public var errorDescription: String? { return self }
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue