Permalink
Browse files

Provide `localizedDescription` for our errors

Commit minor changes to Social and OMG extensions.
  • Loading branch information...
mxcl committed Dec 4, 2017
1 parent 3ee3fe0 commit ca17677756dba80202bf033a4edd3edee4320e04
Showing with 11 additions and 5 deletions.
  1. +1 −1 Extensions/OMGHTTPURLRQ
  2. +1 −1 Extensions/Social
  3. +9 −3 Sources/Error.swift
Submodule Social updated 1 files
+2 −0 Cartfile.resolved
View
@@ -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

0 comments on commit ca17677

Please sign in to comment.