Provide localizedDescription for our errors
Commit minor changes to Social and OMG extensions.
This commit is contained in:
parent
3ee3fe0cac
commit
ca17677756
@ -1 +1 @@
|
||||
Subproject commit 97bcc046a9ed782c0493ff7897cdbb6c57979099
|
||||
Subproject commit 0d0d5a18021cb007b18a4a96e6cf4163f67f41c7
|
||||
@ -1 +1 @@
|
||||
Subproject commit 04d8d7ad1f3cb0649b4f4f648e73095ab79c7049
|
||||
Subproject commit 34cc22feb6738d73b71f6fb532020068df489586
|
||||
@ -23,8 +23,8 @@ public enum PMKError: Error {
|
||||
case flatMap(Any, Any.Type)
|
||||
}
|
||||
|
||||
extension PMKError: CustomStringConvertible {
|
||||
public var description: String {
|
||||
extension PMKError: CustomDebugStringConvertible {
|
||||
public var debugDescription: String {
|
||||
switch self {
|
||||
case .flatMap(let obj, let type):
|
||||
return "Could not `flatMap<\(type)>`: \(obj)"
|
||||
@ -35,11 +35,17 @@ extension PMKError: CustomStringConvertible {
|
||||
case .badInput:
|
||||
return "Bad input was provided to a PromiseKit function"
|
||||
case .cancelled:
|
||||
return "The operation was cancelled"
|
||||
return "The asynchronous sequence was cancelled"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension PMKError: LocalizedError {
|
||||
public var errorDescription: String? {
|
||||
return debugDescription
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////// Cancellation
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user